Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

firewire: sbp2: octlet AT payloads can be stack-allocated

We do not need slab allocations for ORB pointer write transactions
anymore in order to satisfy streaming DMA mapping constraints, thanks to
commit da28947e7e36 "firewire: ohci: avoid separate DMA mapping for
small AT payloads".

(Besides, the slab-allocated buffers that firewire-sbp2 used to provide
for 8-byte write requests were still not fully portable since they
shared a cacheline with unrelated CPU-accessed data.)

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

+4 -4
+4 -4
drivers/firewire/sbp2.c
··· 258 258 struct kref kref; 259 259 dma_addr_t request_bus; 260 260 int rcode; 261 - struct sbp2_pointer pointer; 262 261 void (*callback)(struct sbp2_orb * orb, struct sbp2_status * status); 263 262 struct list_head link; 264 263 }; ··· 489 490 int node_id, int generation, u64 offset) 490 491 { 491 492 struct fw_device *device = target_device(lu->tgt); 493 + struct sbp2_pointer orb_pointer; 492 494 unsigned long flags; 493 495 494 - orb->pointer.high = 0; 495 - orb->pointer.low = cpu_to_be32(orb->request_bus); 496 + orb_pointer.high = 0; 497 + orb_pointer.low = cpu_to_be32(orb->request_bus); 496 498 497 499 spin_lock_irqsave(&device->card->lock, flags); 498 500 list_add_tail(&orb->link, &lu->orb_list); ··· 504 504 505 505 fw_send_request(device->card, &orb->t, TCODE_WRITE_BLOCK_REQUEST, 506 506 node_id, generation, device->max_speed, offset, 507 - &orb->pointer, 8, complete_transaction, orb); 507 + &orb_pointer, 8, complete_transaction, orb); 508 508 } 509 509 510 510 static int sbp2_cancel_orbs(struct sbp2_logical_unit *lu)