summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_port.c
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2011-06-13 15:46:21 -0700
committerJames Bottomley <JBottomley@Parallels.com>2011-06-29 15:27:46 -0500
commit43ffdf4dfb827babcdca5345a76031598a985dc8 (patch)
tree54d7a506915bcc657e80dbee07523aad8a60e984 /drivers/scsi/bfa/bfa_port.c
parentd37779f8d98a1d7c5ba904982958167d988f01dd (diff)
downloadlinux-stable-43ffdf4dfb827babcdca5345a76031598a985dc8.tar.gz
linux-stable-43ffdf4dfb827babcdca5345a76031598a985dc8.tar.bz2
linux-stable-43ffdf4dfb827babcdca5345a76031598a985dc8.zip
[SCSI] bfa: Add pbc port disable check and fix LPS message name
- Add PBC port Disabled condition check. - Rename incorrectly named LPS I2H messages. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfa_port.c')
-rw-r--r--drivers/scsi/bfa/bfa_port.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfa_port.c b/drivers/scsi/bfa/bfa_port.c
index 5ebdb6297b4c..6b759364ac90 100644
--- a/drivers/scsi/bfa/bfa_port.c
+++ b/drivers/scsi/bfa/bfa_port.c
@@ -236,6 +236,12 @@ bfa_port_enable(struct bfa_port_s *port, bfa_port_endis_cbfn_t cbfn,
{
struct bfi_port_generic_req_s *m;
+ /* If port is PBC disabled, return error */
+ if (port->pbc_disabled) {
+ bfa_trc(port, BFA_STATUS_PBC);
+ return BFA_STATUS_PBC;
+ }
+
if (bfa_ioc_is_disabled(port->ioc)) {
bfa_trc(port, BFA_STATUS_IOC_DISABLED);
return BFA_STATUS_IOC_DISABLED;
@@ -280,6 +286,12 @@ bfa_port_disable(struct bfa_port_s *port, bfa_port_endis_cbfn_t cbfn,
{
struct bfi_port_generic_req_s *m;
+ /* If port is PBC disabled, return error */
+ if (port->pbc_disabled) {
+ bfa_trc(port, BFA_STATUS_PBC);
+ return BFA_STATUS_PBC;
+ }
+
if (bfa_ioc_is_disabled(port->ioc)) {
bfa_trc(port, BFA_STATUS_IOC_DISABLED);
return BFA_STATUS_IOC_DISABLED;
@@ -456,6 +468,7 @@ bfa_port_attach(struct bfa_port_s *port, struct bfa_ioc_s *ioc,
port->endis_pending = BFA_FALSE;
port->stats_cbfn = NULL;
port->endis_cbfn = NULL;
+ port->pbc_disabled = BFA_FALSE;
bfa_ioc_mbox_regisr(port->ioc, BFI_MC_PORT, bfa_port_isr, port);
bfa_ioc_notify_init(&port->ioc_notify, bfa_port_notify, port);