@@ -538,15 +538,13 @@ EXPORT_SYMBOL(fw_card_add);
538
538
* as all IO to the card will be handled (and failed) by the dummy driver
539
539
* instead of calling into the module. Only functions for iso context
540
540
* shutdown still need to be provided by the card driver.
541
+ *
542
+ * .read/write_csr() should never be called anymore after the dummy driver
543
+ * was bound since they are only used within request handler context.
544
+ * .set_config_rom() is never called since the card is taken out of card_list
545
+ * before switching to the dummy driver.
541
546
*/
542
547
543
- static int dummy_enable (struct fw_card * card ,
544
- const __be32 * config_rom , size_t length )
545
- {
546
- BUG ();
547
- return -1 ;
548
- }
549
-
550
548
static int dummy_read_phy_reg (struct fw_card * card , int address )
551
549
{
552
550
return - ENODEV ;
@@ -558,17 +556,6 @@ static int dummy_update_phy_reg(struct fw_card *card, int address,
558
556
return - ENODEV ;
559
557
}
560
558
561
- static int dummy_set_config_rom (struct fw_card * card ,
562
- const __be32 * config_rom , size_t length )
563
- {
564
- /*
565
- * We take the card out of card_list before setting the dummy
566
- * driver, so this should never get called.
567
- */
568
- BUG ();
569
- return -1 ;
570
- }
571
-
572
559
static void dummy_send_request (struct fw_card * card , struct fw_packet * packet )
573
560
{
574
561
packet -> callback (packet , card , RCODE_CANCELLED );
@@ -590,15 +577,40 @@ static int dummy_enable_phys_dma(struct fw_card *card,
590
577
return - ENODEV ;
591
578
}
592
579
580
+ static struct fw_iso_context * dummy_allocate_iso_context (struct fw_card * card ,
581
+ int type , int channel , size_t header_size )
582
+ {
583
+ return ERR_PTR (- ENODEV );
584
+ }
585
+
586
+ static int dummy_start_iso (struct fw_iso_context * ctx ,
587
+ s32 cycle , u32 sync , u32 tags )
588
+ {
589
+ return - ENODEV ;
590
+ }
591
+
592
+ static int dummy_set_iso_channels (struct fw_iso_context * ctx , u64 * channels )
593
+ {
594
+ return - ENODEV ;
595
+ }
596
+
597
+ static int dummy_queue_iso (struct fw_iso_context * ctx , struct fw_iso_packet * p ,
598
+ struct fw_iso_buffer * buffer , unsigned long payload )
599
+ {
600
+ return - ENODEV ;
601
+ }
602
+
593
603
static const struct fw_card_driver dummy_driver_template = {
594
- .enable = dummy_enable ,
595
- .read_phy_reg = dummy_read_phy_reg ,
596
- .update_phy_reg = dummy_update_phy_reg ,
597
- .set_config_rom = dummy_set_config_rom ,
598
- .send_request = dummy_send_request ,
599
- .cancel_packet = dummy_cancel_packet ,
600
- .send_response = dummy_send_response ,
601
- .enable_phys_dma = dummy_enable_phys_dma ,
604
+ .read_phy_reg = dummy_read_phy_reg ,
605
+ .update_phy_reg = dummy_update_phy_reg ,
606
+ .send_request = dummy_send_request ,
607
+ .send_response = dummy_send_response ,
608
+ .cancel_packet = dummy_cancel_packet ,
609
+ .enable_phys_dma = dummy_enable_phys_dma ,
610
+ .allocate_iso_context = dummy_allocate_iso_context ,
611
+ .start_iso = dummy_start_iso ,
612
+ .set_iso_channels = dummy_set_iso_channels ,
613
+ .queue_iso = dummy_queue_iso ,
602
614
};
603
615
604
616
void fw_card_release (struct kref * kref )
0 commit comments