On Sun, 23 Jul 2006, Daniel Drake wrote: > Matthew Dharm wrote: > > I think that is a better approach than your patch. Perhaps the zd1211rw > > driver could know the VID/PID of the fake CD-ROM to attach to it and send > > the fake eject command. The usb-storage (and probably ub) would just have > > to ignore the device. > > Ok, I've handled the zd1211rw side. Unless I'm mistaken, usb-storage > doesn't currently have a way of blacklisting a device. > > How does this patch look?
In general the idea looks okay to me, but I would change the details in storage/usb.c. Check for US_FL_IGNORE_DEVICE in the get_device_info() routine, and make that routine return int instead of void. If the flag is present you can simply return -ENODEV. Then in storage_probe(), you check the return code and jump to BadDevice if it's nonzero, just like with all the following subroutine calls. Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel