Re: [PATCH 1 09/25] hpsa: fix physical target reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29.10.2015 16:29, Don Brace wrote:
> On 10/29/2015 09:30 AM, Tomas Henzl wrote:
>> On 28.10.2015 23:05, Don Brace wrote:
>>> From: Scott Teel <scott.teel@xxxxxxxx>
>>>
>>> Set reset type in device_reset_handler to do either
>>> logical unit reset for logical devices, or physical
>>> target reset, for physical devices.
>>>
>>> Reviewed-by: Scott Teel <scott.teel@xxxxxxxx>
>>> Reviewed-by: Justin Lindley <justin.lindley@xxxxxxxx>
>>> Reviewed-by: Kevin Barnett <kevin.barnett@xxxxxxxx>
>>> Signed-off-by: Don Brace <don.brace@xxxxxxxx>
>>> ---
>>>   drivers/scsi/hpsa.c |   34 ++++++++++++++++++++++++++++------
>>>   drivers/scsi/hpsa.h |    1 +
>>>   2 files changed, 29 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
>>> index 08a761c..67136fb 100644
>>> --- a/drivers/scsi/hpsa.c
>>> +++ b/drivers/scsi/hpsa.c
>>> @@ -2746,9 +2746,8 @@ static int hpsa_send_reset(struct ctlr_info *h, unsigned char *scsi3addr,
>>>   
>>>   
>>>   	/* fill_cmd can't fail here, no data buffer to map. */
>>> -	(void) fill_cmd(c, HPSA_DEVICE_RESET_MSG, h, NULL, 0, 0,
>>> +	(void) fill_cmd(c, reset_type, h, NULL, 0, 0,
>>>   			scsi3addr, TYPE_MSG);
>>> -	c->Request.CDB[1] = reset_type; /* fill_cmd defaults to LUN reset */
>>>   	rc = hpsa_scsi_do_simple_cmd(h, c, reply_queue, NO_TIMEOUT);
>>>   	if (rc) {
>>>   		dev_warn(&h->pdev->dev, "Failed to send reset command\n");
>>> @@ -5216,6 +5215,7 @@ static int hpsa_eh_device_reset_handler(struct scsi_cmnd *scsicmd)
>>>   	int rc;
>>>   	struct ctlr_info *h;
>>>   	struct hpsa_scsi_dev_t *dev;
>>> +	u8 reset_type;
>>>   	char msg[48];
>>>   
>>>   	/* find the controller to which the command to be aborted was sent */
>>> @@ -5254,15 +5254,23 @@ static int hpsa_eh_device_reset_handler(struct scsi_cmnd *scsicmd)
>>>   	if (is_hba_lunid(dev->scsi3addr))
>>>   		return SUCCESS;
>>>   
>>> -	hpsa_show_dev_msg(KERN_WARNING, h, dev, "resetting");
>>> +	if (is_logical_dev_addr_mode(dev->scsi3addr))
>>> +		reset_type = HPSA_DEVICE_RESET_MSG;
>>> +	else
>>> +		reset_type = HPSA_PHYS_TARGET_RESET;
>>> +
>>> +	sprintf(msg, "resetting %s",
>>> +		reset_type == HPSA_DEVICE_RESET_MSG ? "logical " : "physical ");
>>> +	hpsa_show_dev_msg(KERN_WARNING, h, dev, msg);
>>>   
>>> */
>> Will this new reset command work for the whole range of hpsa devices?
>> (and for the older cciss hw - hpsa_allow_any) ?
> The new reset works for newer controller that support HBA mode or IO
> bypass mode that allow the driver to send commands directly to a
> physical device. This new reset is for those situations.
>
> We still do the existing reset for RAID volumes.

ok, so -
Reviewed-by: Tomas Henzl <thenzl@xxxxxxxxxx>

Tomas


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux