Current-Users archive

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

Re: NetBSD vs. Acer Aspire One (feat. dmesg)

On Mon, 25 Aug 2008, Robert Swindells wrote:

The sdhc(4)/sdmmc(4) driver has already been ported to NetBSD and works
fairly well.  However, there was some objection to its emulation of a
scsipi device.  I'm in the process of converting it to use ld(4), but
have run into some locking issues.  I don't have one of these SD card
readers myself (I'm working on the driver for someone else), so it's a
slow debugging process.

The locking issues have only appeared fairly recently, it would be
good to get something into the tree to avoid this kind of breakage
happening again.

Well, actually, the version of sdhc(4)/sdmmc(4) that uses a scsipi layer works fairly well, with no locking issues that I'm aware of. I didn't do the initial port, I just cleaned up the code that was posted here some months ago. I've lost the Email addr of the person who posted it,
but it should be in the Email archives.

I was thinking about looking at the locking problem, what changes have
you made ?

My changes have been two-fold. One, I've "normalized" all the debug messages so that they were more consistent - purely cosmetic.

The major change I've made is to rip out the scsipi layer completely, and replace it with an interface to the ld(4) driver.

As for the current locking problem, I'm still tracking it down, but it appears that a cv_broadcast() call isn't waking up the thread that's waiting for the condvar. So the thread has a work-queue entry to read some data (ld(4) is trying to see if there's a disk label), but the data never gets read and therefore the ld(4) driver never completes attaching the SD card.

|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | |

Home | Main Index | Thread Index | Old Index