Re: aic7xxx patch

Robert J. Block (rob.block@Sun.COM)
Thu, 11 Sep 1997 00:10:41 -0700

I've been using this patch for over a week now with good results.
The problem I previously reported with my Umax scanner turned out to be
a termination problem, and I fixed that problem after installing the
so I don't actually know what difference, if any, the patch would have
if the scanner had been properly terminated in the first place.

But the bottom line is: the scanner works great with this driver. I can
turn the scanner off and on at will and still be able to scan (the
driver is compiled into the kernel).


1) the scanner is the only thing attached to the controller. nothing
else on
the bus (probably makes things easier).

2) the scanner does occasionally lock up when I try to scan, but
the unit always works, I've never had to reboot the machine.

3) I'm able to get only 300dpi resolution, not the max. 600 that the S12
When I try more than 300, the scanner tries to scan but freezes up.

All in all, I'm having a loads of fun with the scanner now and really
the great work you guys did on the driver. The interface is sooo much
nicer than
the Adobe/Windows software that came with the unit, and best of all, I
have to boot Windows anymore. Every piece of hardware I own works with

I didn't have much luck getting the tk/tcl gui to work (didn't try very
but I was able to set up a simple alias to turn my scanner/printer combo
an instant b&w copy machine:

alias xerox umax-cli -R300 -l | pbmtolps -dpi 300 | lpr

I'll report any more glitches that I find, but this mostly works great.


Robert J. Block      | Sun Microsystems Inc.    | <URL:>
"I do have a cause. It's obscenity. I'm for it." -Tom Lehrer

Doug Ledford wrote: > > As many of you may recall, I've recently been working on a patch to the > aic7xxx driver to improve several aspects of that driver's reliability. At > this point, I think I've reached a decent place to stop current development > and only make changes to the driver as any bug reports in the current patch > filter in. The current version of the patch is aic7xxx-abort-Sep05, and a > diffstat on the patch looks like this: > > Documentation/ | 78 + > drivers/scsi/ | 4 > drivers/scsi/aic7xxx.c | 2273 ++++++++++++++++++++++++++------------- > drivers/scsi/aic7xxx.h | 5 > drivers/scsi/aic7xxx_proc.c | 224 +--- > 5 files changed, 1663 insertions, 921 deletions > > People interested in trying this patch can find it at in > /pub/linux/aic7xxx. Included here as well is the readme file associated > with this patch to give an idea of what changes exactly have taken place, > what problems were fixed, and a list of the current known bugs. > > [ aic7xxx-abort-Sep05.README ] > > I would like to thank all of the people that have been testing out these > patches for me. This verion represents what is very nearly a "finished" > work (if that can be acheived). Here is a run down of this patch: > > Note: this patch applies against kernel 2.0.31-pre-7 > > Changes: > > aic7xxx_abort(): Totally re-written from the ground up. I think the only > original code remaining is the prototye, the open and close brace, > and a few variable definitions. > aic7xxx_reset(): See above. > Internal helper functions for aic7xxx_{abort,reset}: In some cases, these > are totally re-written as well, in others, they are just modified > to fit the new abort/reset schema. > aic7xxx_handle_seqint(): Modified to handle new abort/reset code as well as > improving the QUEUE_FULL and BUSY condition error handling. Corrected > handling of CHECK_CONDITION when we are sending an SDTR or WDTR > message to the target. > aic7xxx_handle_scsiint(): Modifications to the BUS_FREE handler as part of > abort/reset fixes. > aic7xxx_handle_device_reset(): Modified for new reset schema. > aic7xxx_bus_device_reset(): Modified for new schema, simplified due to a > a reduced set of conditions under which this function can be called. > aic7xxx_isr(): Slight modifications to the CMDOUTCNT variable handling to > avoid some race conditions that were causing problems. > aic7xxx_queue(): Modified to handle devices with delayed SCB queues. > aic7xxx_run_waiting_queues(): See above. > aic7xxx_timer(): New function added as part of QUEUE_FULL and BUSY handling. > aic7xxx_detect(): Added a boot time message, fixed an off by one memory > scribble, and added some new initialization code for new variables. > aic7xxx_proc.c: New file from Heinz Mauelshagen incorporated to fix a > serious memory overflow error, then later modified by me to remove > the need to make two passes through our structures and calls to > sprintf in order to determine buffer size. > aic7xxx_done(): Modified for new handling of abort/reset scbs and the added > variables brought out by QUEUE_FULL and BUSY handling. > aic7xxx_search_qinfifo(): Modified to allow an arbitrary destination queue > for SCBs that need to be requeued. Also modified to preserve the > SCB_RECOVERY_SCB flag regardless of passed in SCB flags. > aic7xxx_buildscb(): Modified to create fake SCSI commands to perform > negotiation with if the real SCSI command is not a TEST_UNIT_READY > command. > aic7xxx_fake_scsi_done(): Used to free the fake commands we created in > aic7xxx_buildscb(). > aic7xxx.c: Increased MAX_SG from 27 to 122 for performance reasons. Changes > to printk's throughout in order to better organize messages according > to the selected aic7xxx=verbose level. Incremented version level in > order to differentiate this code from the stock aic7xxx driver. > aic7xxx.h: Added back our support for the aic7xxx_abort function. > Changed the default settings for the aic7xxx driver to reflect > things that used to be broken but now work reliably. > Added help items for the aic7xxx config options. > > Probably others that I can't remember right now, and I don't want to go > looking through the diff file just to list them here. > > Problems fixed: > > 1. Abort/reset loops and machine lockups should be greatly reduced with this > patch. Actually, loops should be gone, but it is still possible to > hang a machine if the drive simply goes away (not really a driver > issue). > 2. QUEUE_FULL handling should work much better now. No more drives simply > refusing to live any longer because we slammed them with commands > so quickly that they could never finish they ones they already had > in their full queues. > 3. BUSY condition handling, see above. > 4. Driver blows up on certain devices during negotiation. Shouldn't happen > any more. Also shouldn't matter any more if a person enables wide > negotiation with early devices that don't know what wide busses are. > The analogous situation for synchronous transfers should also be > true. > 5. Memory overflows from aic7xxx_proc.c should be gone. > 6. Memory scribble during init is gone. > 7. We no longer show transfer stats on devices that don't exist when > proc statistics is enabled. > 8. aic7xxx=verbose setting is no longer on/off, but is instead cumulative > such that higher verbosity levels result in more printed messages. > I recommend the setting aic7xxx=verbose:1 for general use and > aic7xxx=verbose:2 or 3 for debugging. > 9. Spurious CMDCMPLT with no CMD for SCB messages should be gone. > > Known bugs: > > 1. A rare command underflow bug with certain brand/model of drives. This > most likely won't get fixed without a SCSI bus analyzer. > 2. A rare condition with certain brand/model drives that can cause an > outgoing command to fail with an unexpected BUSFREE condition. We > handle this in the driver, but would need to change the sequencer > to actually solve the problem. I've only seen this one once in about > 30 days of hard testing, so it may not even be worth fixing. > > -- > ***************************************************************************** > * Doug Ledford * Unix, Novell, Dos, Windows 3.x, * > * 873-DIAL * WfW, Windows 95 & NT Technician * > * PPP access $14.95/month ***************************************** > * Springfield, MO and surrounding * Usenet news, e-mail and shell account.* > * communities. Sign-up online at * Web page creation and hosting, other * > * 873-9000 V.34 * services available, call for info. * > *****************************************************************************