• Stephen Cameron's avatar
    hpsa: remove incorrect BUG_ONs checking for raid offload enable · 6f99a916
    Stephen Cameron authored
    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: default avatarScott Teel <scott.teel@pmcs.com>
    Signed-off-by: default avatarDon Brace <don.brace@pmcs.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    6f99a916
hpsa.c 216 KB