Oops. I guess this was the actual patch I sent. Brian King wrote: > James Bottomley wrote: > >> On Tue, 2004-08-03 at 10:49, Brian King wrote: >> >>> Add locking to scsi_activate_tcq and scsi_deactivate_tcq to fix a race >>> condition that can occur when disabling tcqing with commands in flight. >> >> >> >> It's possible to do it like this. However, we should really quiesce the >> SCSI device before disabling tcq. It is not legal in the scsi spec to >> have both tagged and untagged commands outstanding. Most drives do the >> right thing and return BUSY to an untagged request if they have tags in >> flight. > > > Ok. I agree that we do not want both tagged and untagged requests going > to the device. In the case of the ipr driver, the adapter microcode > handles this for me. If there are tagged requests outstanding to a > device and an untagged request is sent, the tagged requests must first > finish, then the untagged request is sent to the device with no other > requests outstanding. > >> Also, we have to wait until all tags return before freeing the >> block layer tag structures...and there's always the devices that do >> strange things in this situation... > > > I sent the following patch to Jens last week as well and he applied it. > This fixes the free problem you mention. -- Brian King eServer Storage I/O IBM Linux Technology Center