* [PATCH] qla4xxx: allow hba to be online when initiator ip address is uninitialized
@ 2007-06-09 0:29 David C Somayajulu
2007-06-09 0:37 ` David C Somayajulu
0 siblings, 1 reply; 6+ messages in thread
From: David C Somayajulu @ 2007-06-09 0:29 UTC (permalink / raw)
To: linux-scsi; +Cc: Mike Christie, David Wagner, David Somayajulu
This patch provides the following:
1. remove warning ignoring the return value of pci_set_mwi()
2. allows HBA to be online when the initiator ip address is uninitialized.
drivers/scsi/qla4xxx/ql4_init.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index d8c064c..1e29f51 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -883,11 +883,12 @@ static int qla4xxx_config_nvram(struct s
static void qla4x00_pci_config(struct scsi_qla_host *ha)
{
uint16_t w;
+ int status;
dev_info(&ha->pdev->dev, "Configuring PCI space...\n");
pci_set_master(ha->pdev);
- pci_set_mwi(ha->pdev);
+ status = pci_set_mwi(ha->pdev);
/*
* We want to respect framework's setting of PCI configuration space
* command register and also want to make sure that all bits of
@@ -1143,32 +1144,30 @@ int qla4xxx_initialize_adapter(struct sc
/* Initialize the Host adapter request/response queues and firmware */
if (qla4xxx_start_firmware(ha) == QLA_ERROR)
- return status;
+ goto exit_init_hba;
if (qla4xxx_validate_mac_address(ha) == QLA_ERROR)
- return status;
+ goto exit_init_hba;
if (qla4xxx_init_local_data(ha) == QLA_ERROR)
- return status;
+ goto exit_init_hba;
status = qla4xxx_init_firmware(ha);
if (status == QLA_ERROR)
- return status;
+ goto exit_init_hba;
/*
* FW is waiting to get an IP address from DHCP server: Skip building
* the ddb_list and wait for DHCP lease acquired aen to come in
* followed by 0x8014 aen" to trigger the tgt discovery process.
*/
- if (ha->firmware_state & FW_STATE_DHCP_IN_PROGRESS){
- set_bit(AF_ONLINE, &ha->flags);
- return status;
- }
+ if (ha->firmware_state & FW_STATE_DHCP_IN_PROGRESS)
+ goto exit_init_online;
/* Skip device discovery if ip and subnet is zero */
if (memcmp(ha->ip_address, ip_address, IP_ADDR_LEN) == 0 ||
memcmp(ha->subnet_mask, ip_address, IP_ADDR_LEN) == 0)
- return status;
+ goto exit_init_online;
if (renew_ddb_list == PRESERVE_DDB_LIST) {
/*
@@ -1197,10 +1196,10 @@ int qla4xxx_initialize_adapter(struct sc
ha->host_no));
}
+exit_init_online:
set_bit(AF_ONLINE, &ha->flags);
- exit_init_hba:
+exit_init_hba:
return status;
-
}
/**
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] qla4xxx: allow hba to be online when initiator ip address is uninitialized
2007-06-09 0:29 [PATCH] qla4xxx: allow hba to be online when initiator ip address is uninitialized David C Somayajulu
@ 2007-06-09 0:37 ` David C Somayajulu
2007-06-14 5:54 ` Mike Christie
0 siblings, 1 reply; 6+ messages in thread
From: David C Somayajulu @ 2007-06-09 0:37 UTC (permalink / raw)
To: linux-scsi; +Cc: Mike Christie, David Wagner, David Somayajulu
On Fri, 2007-06-08 at 17:29 -0700, David C Somayajulu wrote:
> This patch provides the following:
> 1. remove warning ignoring the return value of pci_set_mwi()
> 2. allows HBA to be online when the initiator ip address is uninitialized.
Including
Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
drivers/scsi/qla4xxx/ql4_init.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index d8c064c..1e29f51 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -883,11 +883,12 @@ static int qla4xxx_config_nvram(struct s
static void qla4x00_pci_config(struct scsi_qla_host *ha)
{
uint16_t w;
+ int status;
dev_info(&ha->pdev->dev, "Configuring PCI space...\n");
pci_set_master(ha->pdev);
- pci_set_mwi(ha->pdev);
+ status = pci_set_mwi(ha->pdev);
/*
* We want to respect framework's setting of PCI configuration space
* command register and also want to make sure that all bits of
@@ -1143,32 +1144,30 @@ int qla4xxx_initialize_adapter(struct sc
/* Initialize the Host adapter request/response queues and firmware */
if (qla4xxx_start_firmware(ha) == QLA_ERROR)
- return status;
+ goto exit_init_hba;
if (qla4xxx_validate_mac_address(ha) == QLA_ERROR)
- return status;
+ goto exit_init_hba;
if (qla4xxx_init_local_data(ha) == QLA_ERROR)
- return status;
+ goto exit_init_hba;
status = qla4xxx_init_firmware(ha);
if (status == QLA_ERROR)
- return status;
+ goto exit_init_hba;
/*
* FW is waiting to get an IP address from DHCP server: Skip building
* the ddb_list and wait for DHCP lease acquired aen to come in
* followed by 0x8014 aen" to trigger the tgt discovery process.
*/
- if (ha->firmware_state & FW_STATE_DHCP_IN_PROGRESS){
- set_bit(AF_ONLINE, &ha->flags);
- return status;
- }
+ if (ha->firmware_state & FW_STATE_DHCP_IN_PROGRESS)
+ goto exit_init_online;
/* Skip device discovery if ip and subnet is zero */
if (memcmp(ha->ip_address, ip_address, IP_ADDR_LEN) == 0 ||
memcmp(ha->subnet_mask, ip_address, IP_ADDR_LEN) == 0)
- return status;
+ goto exit_init_online;
if (renew_ddb_list == PRESERVE_DDB_LIST) {
/*
@@ -1197,10 +1196,10 @@ int qla4xxx_initialize_adapter(struct sc
ha->host_no));
}
+exit_init_online:
set_bit(AF_ONLINE, &ha->flags);
- exit_init_hba:
+exit_init_hba:
return status;
-
}
/**
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] qla4xxx: allow hba to be online when initiator ip address is uninitialized
2007-06-09 0:37 ` David C Somayajulu
@ 2007-06-14 5:54 ` Mike Christie
2007-06-14 17:27 ` David C Somayajulu
0 siblings, 1 reply; 6+ messages in thread
From: Mike Christie @ 2007-06-14 5:54 UTC (permalink / raw)
To: David C Somayajulu; +Cc: linux-scsi, David Wagner
David C Somayajulu wrote:
> On Fri, 2007-06-08 at 17:29 -0700, David C Somayajulu wrote:
>> This patch provides the following:
>> 1. remove warning ignoring the return value of pci_set_mwi()
>> 2. allows HBA to be online when the initiator ip address is uninitialized.
> Including
>
> Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
>
> drivers/scsi/qla4xxx/ql4_init.c | 23 +++++++++++------------
> 1 files changed, 11 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
> index d8c064c..1e29f51 100644
> --- a/drivers/scsi/qla4xxx/ql4_init.c
> +++ b/drivers/scsi/qla4xxx/ql4_init.c
> @@ -883,11 +883,12 @@ static int qla4xxx_config_nvram(struct s
> static void qla4x00_pci_config(struct scsi_qla_host *ha)
> {
> uint16_t w;
> + int status;
>
> dev_info(&ha->pdev->dev, "Configuring PCI space...\n");
>
> pci_set_master(ha->pdev);
> - pci_set_mwi(ha->pdev);
> + status = pci_set_mwi(ha->pdev);
It looks ok, but creating the status variable and setting it like this,
just to quiet the compile warning, and never doing anything else with it
doesn't seem nice.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] qla4xxx: allow hba to be online when initiator ip address is uninitialized
2007-06-14 5:54 ` Mike Christie
@ 2007-06-14 17:27 ` David C Somayajulu
2007-06-14 17:44 ` Andrew Vasquez
0 siblings, 1 reply; 6+ messages in thread
From: David C Somayajulu @ 2007-06-14 17:27 UTC (permalink / raw)
To: Mike Christie; +Cc: linux-scsi, David Wagner, David Somayajulu
On Thu, 2007-06-14 at 01:54 -0400, Mike Christie wrote:
> David C Somayajulu wrote:
> > On Fri, 2007-06-08 at 17:29 -0700, David C Somayajulu wrote:
> >> This patch provides the following:
> >> 1. remove warning ignoring the return value of pci_set_mwi()
> >> 2. allows HBA to be online when the initiator ip address is uninitialized.
> > Including
> >
> > Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
> >
> > drivers/scsi/qla4xxx/ql4_init.c | 23 +++++++++++------------
> > 1 files changed, 11 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
> > index d8c064c..1e29f51 100644
> > --- a/drivers/scsi/qla4xxx/ql4_init.c
> > +++ b/drivers/scsi/qla4xxx/ql4_init.c
> > @@ -883,11 +883,12 @@ static int qla4xxx_config_nvram(struct s
> > static void qla4x00_pci_config(struct scsi_qla_host *ha)
> > {
> > uint16_t w;
> > + int status;
> >
> > dev_info(&ha->pdev->dev, "Configuring PCI space...\n");
> >
> > pci_set_master(ha->pdev);
> > - pci_set_mwi(ha->pdev);
> > + status = pci_set_mwi(ha->pdev);
>
>
> It looks ok, but creating the status variable and setting it like this,
> just to quiet the compile warning, and never doing anything else with it
> doesn't seem nice.
I don't like it either. I tried with
(void)pci_set_mwi(ha->pdev);
and this is what I see
CC [M] drivers/scsi/qla4xxx/ql4_init.o
drivers/scsi/qla4xxx/ql4_init.c: In function ‘qla4x00_pci_config’:
drivers/scsi/qla4xxx/ql4_init.c:890: warning: ignoring return value of ‘pci_set_mwi’, declared with attribute warn_unused_result
LD [M] drivers/scsi/qla4xxx/qla4xxx.o
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] qla4xxx: allow hba to be online when initiator ip address is uninitialized
2007-06-14 17:27 ` David C Somayajulu
@ 2007-06-14 17:44 ` Andrew Vasquez
2007-06-14 17:54 ` Randy Dunlap
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Vasquez @ 2007-06-14 17:44 UTC (permalink / raw)
To: David C Somayajulu; +Cc: Mike Christie, linux-scsi, David Wagner
On Thu, 14 Jun 2007, David Somayajulu wrote:
> On Thu, 2007-06-14 at 01:54 -0400, Mike Christie wrote:
> > David C Somayajulu wrote:
> >
> > It looks ok, but creating the status variable and setting it like this,
> > just to quiet the compile warning, and never doing anything else with it
> > doesn't seem nice.
> I don't like it either. I tried with
> (void)pci_set_mwi(ha->pdev);
> and this is what I see
I was hoping that Randy's proposal for pci_try_set_mwi() was accepted:
http://article.gmane.org/gmane.linux.scsi/31230/
that way drivers could safely ignore the return (if necessary).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] qla4xxx: allow hba to be online when initiator ip address is uninitialized
2007-06-14 17:44 ` Andrew Vasquez
@ 2007-06-14 17:54 ` Randy Dunlap
0 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2007-06-14 17:54 UTC (permalink / raw)
To: Andrew Vasquez
Cc: David C Somayajulu, Mike Christie, linux-scsi, David Wagner
On Thu, 14 Jun 2007 10:44:20 -0700 Andrew Vasquez wrote:
> On Thu, 14 Jun 2007, David Somayajulu wrote:
>
> > On Thu, 2007-06-14 at 01:54 -0400, Mike Christie wrote:
> > > David C Somayajulu wrote:
> > >
> > > It looks ok, but creating the status variable and setting it like this,
> > > just to quiet the compile warning, and never doing anything else with it
> > > doesn't seem nice.
> > I don't like it either. I tried with
> > (void)pci_set_mwi(ha->pdev);
> > and this is what I see
>
> I was hoping that Randy's proposal for pci_try_set_mwi() was accepted:
>
> http://article.gmane.org/gmane.linux.scsi/31230/
>
> that way drivers could safely ignore the return (if necessary).
Andrew seems to still be trying to push it (i.e., he hasn't
given up on it yet).
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-06-14 17:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-09 0:29 [PATCH] qla4xxx: allow hba to be online when initiator ip address is uninitialized David C Somayajulu
2007-06-09 0:37 ` David C Somayajulu
2007-06-14 5:54 ` Mike Christie
2007-06-14 17:27 ` David C Somayajulu
2007-06-14 17:44 ` Andrew Vasquez
2007-06-14 17:54 ` Randy Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.