Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93095
b: refs/heads/master
c: c9fcbf4
h: refs/heads/master
i:
  93093: b4c441b
  93091: ba6cb44
  93087: 715a705
v: v3
  • Loading branch information
Sreenivasa Honnur authored and Jeff Garzik committed Apr 25, 2008
1 parent a19c519 commit 8e2de1c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 36 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: 99993af6981aaf8d212a5efa888a19c9db152d58
refs/heads/master: c9fcbf4774d7a29b73078017af25d100f152a4af
31 changes: 2 additions & 29 deletions trunk/drivers/net/s2io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2530,7 +2530,6 @@ static int fill_rx_buffers(struct s2io_nic *nic, int ring_no)
struct config_param *config;
u64 tmp;
struct buffAdd *ba;
unsigned long flags;
struct RxD_t *first_rxdp = NULL;
u64 Buffer0_ptr = 0, Buffer1_ptr = 0;
struct RxD1 *rxdp1;
Expand Down Expand Up @@ -2578,15 +2577,7 @@ static int fill_rx_buffers(struct s2io_nic *nic, int ring_no)
DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n",
dev->name, rxdp);
}
if(!napi) {
spin_lock_irqsave(&nic->put_lock, flags);
mac_control->rings[ring_no].put_pos =
(block_no * (rxd_count[nic->rxd_mode] + 1)) + off;
spin_unlock_irqrestore(&nic->put_lock, flags);
} else {
mac_control->rings[ring_no].put_pos =
(block_no * (rxd_count[nic->rxd_mode] + 1)) + off;
}

if ((rxdp->Control_1 & RXD_OWN_XENA) &&
((nic->rxd_mode == RXD_MODE_3B) &&
(rxdp->Control_2 & s2BIT(0)))) {
Expand Down Expand Up @@ -2964,7 +2955,7 @@ static void rx_intr_handler(struct ring_info *ring_data)
{
struct s2io_nic *nic = ring_data->nic;
struct net_device *dev = (struct net_device *) nic->dev;
int get_block, put_block, put_offset;
int get_block, put_block;
struct rx_curr_get_info get_info, put_info;
struct RxD_t *rxdp;
struct sk_buff *skb;
Expand All @@ -2973,19 +2964,11 @@ static void rx_intr_handler(struct ring_info *ring_data)
struct RxD1* rxdp1;
struct RxD3* rxdp3;

spin_lock(&nic->rx_lock);

get_info = ring_data->rx_curr_get_info;
get_block = get_info.block_index;
memcpy(&put_info, &ring_data->rx_curr_put_info, sizeof(put_info));
put_block = put_info.block_index;
rxdp = ring_data->rx_blocks[get_block].rxds[get_info.offset].virt_addr;
if (!napi) {
spin_lock(&nic->put_lock);
put_offset = ring_data->put_pos;
spin_unlock(&nic->put_lock);
} else
put_offset = ring_data->put_pos;

while (RXD_IS_UP2DT(rxdp)) {
/*
Expand All @@ -3002,7 +2985,6 @@ static void rx_intr_handler(struct ring_info *ring_data)
DBG_PRINT(ERR_DBG, "%s: The skb is ",
dev->name);
DBG_PRINT(ERR_DBG, "Null in Rx Intr\n");
spin_unlock(&nic->rx_lock);
return;
}
if (nic->rxd_mode == RXD_MODE_1) {
Expand Down Expand Up @@ -3058,8 +3040,6 @@ static void rx_intr_handler(struct ring_info *ring_data)
}
}
}

spin_unlock(&nic->rx_lock);
}

/**
Expand Down Expand Up @@ -7083,7 +7063,6 @@ static void do_s2io_card_down(struct s2io_nic * sp, int do_io)
{
int cnt = 0;
struct XENA_dev_config __iomem *bar0 = sp->bar0;
unsigned long flags;
register u64 val64 = 0;
struct config_param *config;
config = &sp->config;
Expand Down Expand Up @@ -7142,9 +7121,7 @@ static void do_s2io_card_down(struct s2io_nic * sp, int do_io)
free_tx_buffers(sp);

/* Free all Rx buffers */
spin_lock_irqsave(&sp->rx_lock, flags);
free_rx_buffers(sp);
spin_unlock_irqrestore(&sp->rx_lock, flags);

clear_bit(__S2IO_STATE_LINK_TASK, &(sp->state));
}
Expand Down Expand Up @@ -8044,10 +8021,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
for (i = 0; i < sp->config.tx_fifo_num; i++)
spin_lock_init(&mac_control->fifos[i].tx_lock);

if (!napi)
spin_lock_init(&sp->put_lock);
spin_lock_init(&sp->rx_lock);

/*
* SXE-002: Configure link and activity LED to init state
* on driver load.
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/net/s2io.h
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,6 @@ struct ring_info {
*/
struct rx_curr_get_info rx_curr_get_info;

/* Index to the absolute position of the put pointer of Rx ring */
int put_pos;

/* Buffer Address store. */
struct buffAdd **ba;
struct s2io_nic *nic;
Expand Down Expand Up @@ -877,8 +874,6 @@ struct s2io_nic {

atomic_t rx_bufs_left[MAX_RX_RINGS];

spinlock_t put_lock;

#define PROMISC 1
#define ALL_MULTI 2

Expand Down Expand Up @@ -962,7 +957,6 @@ struct s2io_nic {
u8 lro;
u16 lro_max_aggr_per_sess;
volatile unsigned long state;
spinlock_t rx_lock;
u64 general_int_mask;
#define VPD_STRING_LEN 80
u8 product_name[VPD_STRING_LEN];
Expand Down

0 comments on commit 8e2de1c

Please sign in to comment.