diff options
Diffstat (limited to 'drivers/block/aoe')
-rw-r--r-- | drivers/block/aoe/aoe.h | 3 | ||||
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 4 | ||||
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 26 |
3 files changed, 21 insertions, 12 deletions
diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h index 2e92cfb4997c..aa8b547ffafa 100644 --- a/drivers/block/aoe/aoe.h +++ b/drivers/block/aoe/aoe.h | |||
@@ -131,7 +131,8 @@ struct aoedev { | |||
131 | struct timer_list timer; | 131 | struct timer_list timer; |
132 | spinlock_t lock; | 132 | spinlock_t lock; |
133 | struct net_device *ifp; /* interface ed is attached to */ | 133 | struct net_device *ifp; /* interface ed is attached to */ |
134 | struct sk_buff *skblist;/* packets needing to be sent */ | 134 | struct sk_buff *sendq_hd; /* packets needing to be sent, list head */ |
135 | struct sk_buff *sendq_tl; | ||
135 | mempool_t *bufpool; /* for deadlock-free Buf allocation */ | 136 | mempool_t *bufpool; /* for deadlock-free Buf allocation */ |
136 | struct list_head bufq; /* queue of bios to work on */ | 137 | struct list_head bufq; /* queue of bios to work on */ |
137 | struct buf *inprocess; /* the one we're currently working on */ | 138 | struct buf *inprocess; /* the one we're currently working on */ |
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index a2735d975846..4780f7926d42 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c | |||
@@ -147,8 +147,8 @@ aoeblk_make_request(request_queue_t *q, struct bio *bio) | |||
147 | list_add_tail(&buf->bufs, &d->bufq); | 147 | list_add_tail(&buf->bufs, &d->bufq); |
148 | aoecmd_work(d); | 148 | aoecmd_work(d); |
149 | 149 | ||
150 | sl = d->skblist; | 150 | sl = d->sendq_hd; |
151 | d->skblist = NULL; | 151 | d->sendq_hd = d->sendq_tl = NULL; |
152 | 152 | ||
153 | spin_unlock_irqrestore(&d->lock, flags); | 153 | spin_unlock_irqrestore(&d->lock, flags); |
154 | 154 | ||
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 60beb8db4612..b5be4b7d7b5b 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
@@ -178,8 +178,12 @@ aoecmd_ata_rw(struct aoedev *d, struct frame *f) | |||
178 | 178 | ||
179 | skb = skb_prepare(d, f); | 179 | skb = skb_prepare(d, f); |
180 | if (skb) { | 180 | if (skb) { |
181 | skb->next = d->skblist; | 181 | skb->next = NULL; |
182 | d->skblist = skb; | 182 | if (d->sendq_hd) |
183 | d->sendq_tl->next = skb; | ||
184 | else | ||
185 | d->sendq_hd = skb; | ||
186 | d->sendq_tl = skb; | ||
183 | } | 187 | } |
184 | } | 188 | } |
185 | 189 | ||
@@ -227,8 +231,12 @@ rexmit(struct aoedev *d, struct frame *f) | |||
227 | 231 | ||
228 | skb = skb_prepare(d, f); | 232 | skb = skb_prepare(d, f); |
229 | if (skb) { | 233 | if (skb) { |
230 | skb->next = d->skblist; | 234 | skb->next = NULL; |
231 | d->skblist = skb; | 235 | if (d->sendq_hd) |
236 | d->sendq_tl->next = skb; | ||
237 | else | ||
238 | d->sendq_hd = skb; | ||
239 | d->sendq_tl = skb; | ||
232 | } | 240 | } |
233 | } | 241 | } |
234 | 242 | ||
@@ -280,8 +288,8 @@ tdie: spin_unlock_irqrestore(&d->lock, flags); | |||
280 | } | 288 | } |
281 | } | 289 | } |
282 | 290 | ||
283 | sl = d->skblist; | 291 | sl = d->sendq_hd; |
284 | d->skblist = NULL; | 292 | d->sendq_hd = d->sendq_tl = NULL; |
285 | if (sl) { | 293 | if (sl) { |
286 | n = d->rttavg <<= 1; | 294 | n = d->rttavg <<= 1; |
287 | if (n > MAXTIMER) | 295 | if (n > MAXTIMER) |
@@ -481,8 +489,8 @@ aoecmd_ata_rsp(struct sk_buff *skb) | |||
481 | 489 | ||
482 | aoecmd_work(d); | 490 | aoecmd_work(d); |
483 | 491 | ||
484 | sl = d->skblist; | 492 | sl = d->sendq_hd; |
485 | d->skblist = NULL; | 493 | d->sendq_hd = d->sendq_tl = NULL; |
486 | 494 | ||
487 | spin_unlock_irqrestore(&d->lock, flags); | 495 | spin_unlock_irqrestore(&d->lock, flags); |
488 | 496 | ||
@@ -531,7 +539,7 @@ aoecmd_cfg(ushort aoemajor, unsigned char aoeminor) | |||
531 | 539 | ||
532 | /* | 540 | /* |
533 | * Since we only call this in one place (and it only prepares one frame) | 541 | * Since we only call this in one place (and it only prepares one frame) |
534 | * we just return the skb. Usually we'd chain it up to the d->skblist. | 542 | * we just return the skb. Usually we'd chain it up to the aoedev sendq. |
535 | */ | 543 | */ |
536 | static struct sk_buff * | 544 | static struct sk_buff * |
537 | aoecmd_ata_id(struct aoedev *d) | 545 | aoecmd_ata_id(struct aoedev *d) |