Okay, now I'm seeing where you are headed... So why are you creating all these new functions and not just using the control/bulk messaging functions in transport.c, which do all the scatter-gather management for you?
Matt Well, you see, in my own tree I have very small drivers. In usb-storage the drivers are many times larger. The reason is that everyone who writes a driver starts by taking a copy of a previous driver. Consequently much code duplication occurs. This is bad in itself, but as people discover small flaws in the code, these flaws get corrected in one driver, and live on in other drivers. Also this divergence is bad. Your question sounds as if I invent functions. But I do not claim such originality. Everywhere I saw five copies of a function, I made a single copy and made these five places use the single copy. For example, datafab_raw_bulk() and jumpshot_raw_bulk() and sddr09_raw_bulk() and sddr55_raw_bulk() and usbat_raw_bulk() now become usb_storage_raw_bulk(). You ask: what silly code - why write things that way? I agree entirely. But this silly code occurred five times, and after the patch it occurs once. That is a much better starting point if one wants to improve this code. And this raw_bulk business is an uninteresting part. The knowledge about smartmedia now also lies embedded many places. Some drivers have more details than others. And this knowledge is needed not only by a handful of drivers in usb/storage.c but also by mtd. So, the next patch, or a next patch, is the extraction of all smartmedia stuff and the creation of smartmedia.c. You have already seen it, or at least, I already send some version last week. Probably there also is some version at ftp.kernel.org. Both changes are changes that do no touch USB or SCSI. A third change does touch the SCSI part of things, namely the patch that makes all drivers return correct or at least reasonable sense codes. Hope that you see what I am doing. And that although it seems as if most of usb-storage is changed, in reality almost nowhere the usb side of things is touched. Andries _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel