NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/56403 (memory mapped mode of wdc(4) at pcmcia(4) broken after jdolecek-ncq branch merge)



The following reply was made to PR kern/56403; it has been noted by GNATS.

From: Rin Okuyama <rokuyama.rk%gmail.com@localhost>
To: "gnats-bugs%NetBSD.org@localhost" <gnats-bugs%NetBSD.org@localhost>
Cc: jdolecek%netbsd.org@localhost
Subject: Re: kern/56403 (memory mapped mode of wdc(4) at pcmcia(4) broken
 after jdolecek-ncq branch merge)
Date: Mon, 4 Oct 2021 15:57:01 +0900

 I've found it!
 
 Before jdolecek-ncq merge, for ATA_POLL, _wdc_ata_bio_start() iterated
 itself and wdc_ata_bio_intr(), until ATA_ITSDONE is achieved.
 
 This behavior has been lost accidentally when ata_xfer_ops:c_poll was
 introduced:
 
 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ata/ata_wdc.c#rev1.106
 
 In order to fix this, I've changed ata_xfer_ops:c_poll from void to
 int, and made wdc_ata_bio_poll() return whether it is to be called
 again or not:
 
 https://gist.github.com/rokuyama/72e261f74d8311cfbef9c701f60d5260
 
 With this patch, wdc(4) at pcmcia(4) (memory-mapped mode) becomes
 working again. And other wdc(4) variants with ATAC_CAP_NOIRQ should
 be fixed too.
 
 Alternatively, we can check ATA_ITSDONE flag in ata_xfer_start()
 with ata_xfer_ops:c_poll being unchanged. But, it is clearer to
 check that flag in c_poll functions, IMO.
 
 Also note that I've found that there is a similar bug in mvsata(4);
 mvsata_bio_poll() should be iterated until ATA_ITSDONE is set:
 
 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/mvsata.c#rev1.36
 
 I've fixed it, but I guess that this does not fix weird behaviors
 reported for mvsata(4)...
 
 I will commit the patch if there's no objection.
 
 Thoughts?
 
 Thanks,
 rin
 


Home | Main Index | Thread Index | Old Index