]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
hpsa: remove incorrect BUG_ONs checking for raid offload enable
authorStephen Cameron <stephenmcameron@gmail.com>
Fri, 23 Jan 2015 22:44:01 +0000 (16:44 -0600)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 2 Feb 2015 17:57:42 +0000 (09:57 -0800)
commit6f99a9160f1947569bc17b85fbe7353a1090dfe7
tree37b0c2e6cbd9f5f715ee9fffbe57697dbe6f3df6
parentc2b0acde0608542add2bfc2a73c23b98f20eeec4
hpsa: remove incorrect BUG_ONs checking for raid offload enable

In set_encrypt_ioaccel2() and in hpsa_scsi_ioaccel_raid_map
there were BUG_ONs that looked like this:

BUG_ON(!(dev->offload_config && dev->offload_enabled));

But, In hpsa_ack_ctlr_events() we have this,

/* Stop sending new RAID offload reqs via the IO accelerator */
scsi_block_requests(h->scsi_host);
for (i = 0; i < h->ndevices; i++)
h->dev[i]->offload_enabled = 0;
hpsa_drain_accel_commands(h);

So, we set offload_enabled = 0 for all drives, then do this
drain_accel_commands, so that means accel commands could still
be in flight, ie. perhaps having just been submitted into
hpsa_scsi_ioaccel_raid_map concurrent with ->offload_enabled
having just been set to zero.

Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/hpsa.c