Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224501
b: refs/heads/master
c: b0044bc
h: refs/heads/master
i:
  224499: ce428c6
v: v3
  • Loading branch information
Rajesh Borundia authored and David S. Miller committed Nov 28, 2010
1 parent 6ceb64d commit 6e8ac49
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5584b8078a60e34ec7d37c9b67a0f3d389a1a2f6
refs/heads/master: b0044bcfa95ddf2e317863fb29121c284b6725ca
1 change: 1 addition & 0 deletions trunk/drivers/net/qlcnic/qlcnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,7 @@ struct qlcnic_ipaddr {
#define QLCNIC_MACSPOOF 0x200
#define QLCNIC_MAC_OVERRIDE_DISABLED 0x400
#define QLCNIC_PROMISC_DISABLED 0x800
#define QLCNIC_NEED_FLR 0x1000
#define QLCNIC_IS_MSI_FAMILY(adapter) \
((adapter)->flags & (QLCNIC_MSI_ENABLED | QLCNIC_MSIX_ENABLED))

Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/net/qlcnic/qlcnic_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,10 @@ int qlcnic_fw_create_ctx(struct qlcnic_adapter *adapter)
{
int err;

if (reset_devices)
if (adapter->flags & QLCNIC_NEED_FLR) {
pci_reset_function(adapter->pdev);
adapter->flags &= ~QLCNIC_NEED_FLR;
}

err = qlcnic_fw_cmd_create_rx_ctx(adapter);
if (err)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/qlcnic/qlcnic_hdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ enum {
#define QLCNIC_DEV_NPAR_OPER 1 /* NPAR Operational */
#define QLCNIC_DEV_NPAR_OPER_TIMEO 30 /* Operational time out */

#define QLC_DEV_CHECK_ACTIVE(VAL, FN) ((VAL) &= (1 << (FN * 4)))
#define QLC_DEV_CHECK_ACTIVE(VAL, FN) ((VAL) & (1 << (FN * 4)))
#define QLC_DEV_SET_REF_CNT(VAL, FN) ((VAL) |= (1 << (FN * 4)))
#define QLC_DEV_CLR_REF_CNT(VAL, FN) ((VAL) &= ~(1 << (FN * 4)))
#define QLC_DEV_SET_RST_RDY(VAL, FN) ((VAL) |= (1 << (FN * 4)))
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/net/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
uint8_t revision_id;
uint8_t pci_using_dac;
char brd_name[QLCNIC_MAX_BOARD_NAME_LEN];
u32 val;

err = pci_enable_device(pdev);
if (err)
Expand Down Expand Up @@ -1546,6 +1547,10 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (err)
goto err_out_iounmap;

val = QLCRD32(adapter, QLCNIC_CRB_DRV_ACTIVE);
if (QLC_DEV_CHECK_ACTIVE(val, adapter->portnum))
adapter->flags |= QLCNIC_NEED_FLR;

err = adapter->nic_ops->start_firmware(adapter);
if (err) {
dev_err(&pdev->dev, "Loading fw failed.Please Reboot\n");
Expand Down

0 comments on commit 6e8ac49

Please sign in to comment.