Subject: Re: Zillion Digital Square driver
To: iMil <imil@home.imil.net>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 12/31/2003 11:47:57
Are you sure the device supports doing it twice?
There are many half broken USB devices out there.

	-- Lennart

iMil wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> Hi list,
> 
> I'm writing a NetBSD userland driver for the Zillion Digital Square
> MP3 player. Things are going pretty well though neither Digital Square nor
> Samsung (which does the chip) gave me any infos on the thing's API.
> Now I'm facing a strange problem with the ugen driver.
> 
> When I first plug in the player, I do the following so I can have some
> infos on teh firmware :
> 
> - -> usb control msg
> - -> usb bulk write with firmware info request
> - -> control
> - -> control
> - -> bulk read
> - -> control
> 
> this works, got teh good reply from the player.
> Now, without unplugging the player, if I re-lauch the code, it hangs on
> the read() call (in the bulk_read function).
> If I un/replug it and re-lauch the code, it works again.
> 
> This piece of code is mine, but I tried libusb form the pkgsrc before
> that, and it behaves strictly the same way. I read some similar problems
> about the libusb but it was supposed to be fixed
> (http://www.geocrawler.com/archives/3/2052/2001/7/0/6121716/), libusb code
> do contain these modifications for all BSD flavors. Anyway, I tried this
> fix by hand on my piece of code, and does nothing more.
> 
> Any idea on this read() locking problem ?
> 
> - -------------------------
> iMil <imil@home.imil.net>                                                 _
>      http://gcu-squad.org                          ASCII ribbon campaign ( )
>                                                     - against HTML email  X
>                                                                 & vCards / \
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (FreeBSD)
> 
> iD8DBQE/8ovlFG3BlGWyzUIRAkQVAJwOQNJHHayKQNb95ffXu3S588VPDwCeM8s5
> OVxi/+Utv3m0bCJUc8cKgY4=
> =a0nS
> -----END PGP SIGNATURE-----
>