diff options
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_osm.h')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.h | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h index 8d6612c19922..55c1fe07969f 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.h +++ b/drivers/scsi/aic7xxx/aic79xx_osm.h | |||
@@ -395,19 +395,19 @@ struct info_str { | |||
395 | }; | 395 | }; |
396 | 396 | ||
397 | /******************************** Locking *************************************/ | 397 | /******************************** Locking *************************************/ |
398 | static __inline void | 398 | static inline void |
399 | ahd_lockinit(struct ahd_softc *ahd) | 399 | ahd_lockinit(struct ahd_softc *ahd) |
400 | { | 400 | { |
401 | spin_lock_init(&ahd->platform_data->spin_lock); | 401 | spin_lock_init(&ahd->platform_data->spin_lock); |
402 | } | 402 | } |
403 | 403 | ||
404 | static __inline void | 404 | static inline void |
405 | ahd_lock(struct ahd_softc *ahd, unsigned long *flags) | 405 | ahd_lock(struct ahd_softc *ahd, unsigned long *flags) |
406 | { | 406 | { |
407 | spin_lock_irqsave(&ahd->platform_data->spin_lock, *flags); | 407 | spin_lock_irqsave(&ahd->platform_data->spin_lock, *flags); |
408 | } | 408 | } |
409 | 409 | ||
410 | static __inline void | 410 | static inline void |
411 | ahd_unlock(struct ahd_softc *ahd, unsigned long *flags) | 411 | ahd_unlock(struct ahd_softc *ahd, unsigned long *flags) |
412 | { | 412 | { |
413 | spin_unlock_irqrestore(&ahd->platform_data->spin_lock, *flags); | 413 | spin_unlock_irqrestore(&ahd->platform_data->spin_lock, *flags); |
@@ -490,29 +490,29 @@ void ahd_pci_write_config(ahd_dev_softc_t pci, | |||
490 | int reg, uint32_t value, | 490 | int reg, uint32_t value, |
491 | int width); | 491 | int width); |
492 | 492 | ||
493 | static __inline int ahd_get_pci_function(ahd_dev_softc_t); | 493 | static inline int ahd_get_pci_function(ahd_dev_softc_t); |
494 | static __inline int | 494 | static inline int |
495 | ahd_get_pci_function(ahd_dev_softc_t pci) | 495 | ahd_get_pci_function(ahd_dev_softc_t pci) |
496 | { | 496 | { |
497 | return (PCI_FUNC(pci->devfn)); | 497 | return (PCI_FUNC(pci->devfn)); |
498 | } | 498 | } |
499 | 499 | ||
500 | static __inline int ahd_get_pci_slot(ahd_dev_softc_t); | 500 | static inline int ahd_get_pci_slot(ahd_dev_softc_t); |
501 | static __inline int | 501 | static inline int |
502 | ahd_get_pci_slot(ahd_dev_softc_t pci) | 502 | ahd_get_pci_slot(ahd_dev_softc_t pci) |
503 | { | 503 | { |
504 | return (PCI_SLOT(pci->devfn)); | 504 | return (PCI_SLOT(pci->devfn)); |
505 | } | 505 | } |
506 | 506 | ||
507 | static __inline int ahd_get_pci_bus(ahd_dev_softc_t); | 507 | static inline int ahd_get_pci_bus(ahd_dev_softc_t); |
508 | static __inline int | 508 | static inline int |
509 | ahd_get_pci_bus(ahd_dev_softc_t pci) | 509 | ahd_get_pci_bus(ahd_dev_softc_t pci) |
510 | { | 510 | { |
511 | return (pci->bus->number); | 511 | return (pci->bus->number); |
512 | } | 512 | } |
513 | 513 | ||
514 | static __inline void ahd_flush_device_writes(struct ahd_softc *); | 514 | static inline void ahd_flush_device_writes(struct ahd_softc *); |
515 | static __inline void | 515 | static inline void |
516 | ahd_flush_device_writes(struct ahd_softc *ahd) | 516 | ahd_flush_device_writes(struct ahd_softc *ahd) |
517 | { | 517 | { |
518 | /* XXX Is this sufficient for all architectures??? */ | 518 | /* XXX Is this sufficient for all architectures??? */ |
@@ -524,81 +524,81 @@ int ahd_linux_proc_info(struct Scsi_Host *, char *, char **, | |||
524 | off_t, int, int); | 524 | off_t, int, int); |
525 | 525 | ||
526 | /*********************** Transaction Access Wrappers **************************/ | 526 | /*********************** Transaction Access Wrappers **************************/ |
527 | static __inline void ahd_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t); | 527 | static inline void ahd_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t); |
528 | static __inline void ahd_set_transaction_status(struct scb *, uint32_t); | 528 | static inline void ahd_set_transaction_status(struct scb *, uint32_t); |
529 | static __inline void ahd_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t); | 529 | static inline void ahd_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t); |
530 | static __inline void ahd_set_scsi_status(struct scb *, uint32_t); | 530 | static inline void ahd_set_scsi_status(struct scb *, uint32_t); |
531 | static __inline uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd); | 531 | static inline uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd); |
532 | static __inline uint32_t ahd_get_transaction_status(struct scb *); | 532 | static inline uint32_t ahd_get_transaction_status(struct scb *); |
533 | static __inline uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd); | 533 | static inline uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd); |
534 | static __inline uint32_t ahd_get_scsi_status(struct scb *); | 534 | static inline uint32_t ahd_get_scsi_status(struct scb *); |
535 | static __inline void ahd_set_transaction_tag(struct scb *, int, u_int); | 535 | static inline void ahd_set_transaction_tag(struct scb *, int, u_int); |
536 | static __inline u_long ahd_get_transfer_length(struct scb *); | 536 | static inline u_long ahd_get_transfer_length(struct scb *); |
537 | static __inline int ahd_get_transfer_dir(struct scb *); | 537 | static inline int ahd_get_transfer_dir(struct scb *); |
538 | static __inline void ahd_set_residual(struct scb *, u_long); | 538 | static inline void ahd_set_residual(struct scb *, u_long); |
539 | static __inline void ahd_set_sense_residual(struct scb *scb, u_long resid); | 539 | static inline void ahd_set_sense_residual(struct scb *scb, u_long resid); |
540 | static __inline u_long ahd_get_residual(struct scb *); | 540 | static inline u_long ahd_get_residual(struct scb *); |
541 | static __inline u_long ahd_get_sense_residual(struct scb *); | 541 | static inline u_long ahd_get_sense_residual(struct scb *); |
542 | static __inline int ahd_perform_autosense(struct scb *); | 542 | static inline int ahd_perform_autosense(struct scb *); |
543 | static __inline uint32_t ahd_get_sense_bufsize(struct ahd_softc *, | 543 | static inline uint32_t ahd_get_sense_bufsize(struct ahd_softc *, |
544 | struct scb *); | 544 | struct scb *); |
545 | static __inline void ahd_notify_xfer_settings_change(struct ahd_softc *, | 545 | static inline void ahd_notify_xfer_settings_change(struct ahd_softc *, |
546 | struct ahd_devinfo *); | 546 | struct ahd_devinfo *); |
547 | static __inline void ahd_platform_scb_free(struct ahd_softc *ahd, | 547 | static inline void ahd_platform_scb_free(struct ahd_softc *ahd, |
548 | struct scb *scb); | 548 | struct scb *scb); |
549 | static __inline void ahd_freeze_scb(struct scb *scb); | 549 | static inline void ahd_freeze_scb(struct scb *scb); |
550 | 550 | ||
551 | static __inline | 551 | static inline |
552 | void ahd_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) | 552 | void ahd_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) |
553 | { | 553 | { |
554 | cmd->result &= ~(CAM_STATUS_MASK << 16); | 554 | cmd->result &= ~(CAM_STATUS_MASK << 16); |
555 | cmd->result |= status << 16; | 555 | cmd->result |= status << 16; |
556 | } | 556 | } |
557 | 557 | ||
558 | static __inline | 558 | static inline |
559 | void ahd_set_transaction_status(struct scb *scb, uint32_t status) | 559 | void ahd_set_transaction_status(struct scb *scb, uint32_t status) |
560 | { | 560 | { |
561 | ahd_cmd_set_transaction_status(scb->io_ctx,status); | 561 | ahd_cmd_set_transaction_status(scb->io_ctx,status); |
562 | } | 562 | } |
563 | 563 | ||
564 | static __inline | 564 | static inline |
565 | void ahd_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status) | 565 | void ahd_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status) |
566 | { | 566 | { |
567 | cmd->result &= ~0xFFFF; | 567 | cmd->result &= ~0xFFFF; |
568 | cmd->result |= status; | 568 | cmd->result |= status; |
569 | } | 569 | } |
570 | 570 | ||
571 | static __inline | 571 | static inline |
572 | void ahd_set_scsi_status(struct scb *scb, uint32_t status) | 572 | void ahd_set_scsi_status(struct scb *scb, uint32_t status) |
573 | { | 573 | { |
574 | ahd_cmd_set_scsi_status(scb->io_ctx, status); | 574 | ahd_cmd_set_scsi_status(scb->io_ctx, status); |
575 | } | 575 | } |
576 | 576 | ||
577 | static __inline | 577 | static inline |
578 | uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd) | 578 | uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd) |
579 | { | 579 | { |
580 | return ((cmd->result >> 16) & CAM_STATUS_MASK); | 580 | return ((cmd->result >> 16) & CAM_STATUS_MASK); |
581 | } | 581 | } |
582 | 582 | ||
583 | static __inline | 583 | static inline |
584 | uint32_t ahd_get_transaction_status(struct scb *scb) | 584 | uint32_t ahd_get_transaction_status(struct scb *scb) |
585 | { | 585 | { |
586 | return (ahd_cmd_get_transaction_status(scb->io_ctx)); | 586 | return (ahd_cmd_get_transaction_status(scb->io_ctx)); |
587 | } | 587 | } |
588 | 588 | ||
589 | static __inline | 589 | static inline |
590 | uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd) | 590 | uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd) |
591 | { | 591 | { |
592 | return (cmd->result & 0xFFFF); | 592 | return (cmd->result & 0xFFFF); |
593 | } | 593 | } |
594 | 594 | ||
595 | static __inline | 595 | static inline |
596 | uint32_t ahd_get_scsi_status(struct scb *scb) | 596 | uint32_t ahd_get_scsi_status(struct scb *scb) |
597 | { | 597 | { |
598 | return (ahd_cmd_get_scsi_status(scb->io_ctx)); | 598 | return (ahd_cmd_get_scsi_status(scb->io_ctx)); |
599 | } | 599 | } |
600 | 600 | ||
601 | static __inline | 601 | static inline |
602 | void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type) | 602 | void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type) |
603 | { | 603 | { |
604 | /* | 604 | /* |
@@ -607,43 +607,43 @@ void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type) | |||
607 | */ | 607 | */ |
608 | } | 608 | } |
609 | 609 | ||
610 | static __inline | 610 | static inline |
611 | u_long ahd_get_transfer_length(struct scb *scb) | 611 | u_long ahd_get_transfer_length(struct scb *scb) |
612 | { | 612 | { |
613 | return (scb->platform_data->xfer_len); | 613 | return (scb->platform_data->xfer_len); |
614 | } | 614 | } |
615 | 615 | ||
616 | static __inline | 616 | static inline |
617 | int ahd_get_transfer_dir(struct scb *scb) | 617 | int ahd_get_transfer_dir(struct scb *scb) |
618 | { | 618 | { |
619 | return (scb->io_ctx->sc_data_direction); | 619 | return (scb->io_ctx->sc_data_direction); |
620 | } | 620 | } |
621 | 621 | ||
622 | static __inline | 622 | static inline |
623 | void ahd_set_residual(struct scb *scb, u_long resid) | 623 | void ahd_set_residual(struct scb *scb, u_long resid) |
624 | { | 624 | { |
625 | scsi_set_resid(scb->io_ctx, resid); | 625 | scsi_set_resid(scb->io_ctx, resid); |
626 | } | 626 | } |
627 | 627 | ||
628 | static __inline | 628 | static inline |
629 | void ahd_set_sense_residual(struct scb *scb, u_long resid) | 629 | void ahd_set_sense_residual(struct scb *scb, u_long resid) |
630 | { | 630 | { |
631 | scb->platform_data->sense_resid = resid; | 631 | scb->platform_data->sense_resid = resid; |
632 | } | 632 | } |
633 | 633 | ||
634 | static __inline | 634 | static inline |
635 | u_long ahd_get_residual(struct scb *scb) | 635 | u_long ahd_get_residual(struct scb *scb) |
636 | { | 636 | { |
637 | return scsi_get_resid(scb->io_ctx); | 637 | return scsi_get_resid(scb->io_ctx); |
638 | } | 638 | } |
639 | 639 | ||
640 | static __inline | 640 | static inline |
641 | u_long ahd_get_sense_residual(struct scb *scb) | 641 | u_long ahd_get_sense_residual(struct scb *scb) |
642 | { | 642 | { |
643 | return (scb->platform_data->sense_resid); | 643 | return (scb->platform_data->sense_resid); |
644 | } | 644 | } |
645 | 645 | ||
646 | static __inline | 646 | static inline |
647 | int ahd_perform_autosense(struct scb *scb) | 647 | int ahd_perform_autosense(struct scb *scb) |
648 | { | 648 | { |
649 | /* | 649 | /* |
@@ -654,20 +654,20 @@ int ahd_perform_autosense(struct scb *scb) | |||
654 | return (1); | 654 | return (1); |
655 | } | 655 | } |
656 | 656 | ||
657 | static __inline uint32_t | 657 | static inline uint32_t |
658 | ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb) | 658 | ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb) |
659 | { | 659 | { |
660 | return (sizeof(struct scsi_sense_data)); | 660 | return (sizeof(struct scsi_sense_data)); |
661 | } | 661 | } |
662 | 662 | ||
663 | static __inline void | 663 | static inline void |
664 | ahd_notify_xfer_settings_change(struct ahd_softc *ahd, | 664 | ahd_notify_xfer_settings_change(struct ahd_softc *ahd, |
665 | struct ahd_devinfo *devinfo) | 665 | struct ahd_devinfo *devinfo) |
666 | { | 666 | { |
667 | /* Nothing to do here for linux */ | 667 | /* Nothing to do here for linux */ |
668 | } | 668 | } |
669 | 669 | ||
670 | static __inline void | 670 | static inline void |
671 | ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb) | 671 | ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb) |
672 | { | 672 | { |
673 | ahd->flags &= ~AHD_RESOURCE_SHORTAGE; | 673 | ahd->flags &= ~AHD_RESOURCE_SHORTAGE; |
@@ -678,7 +678,7 @@ void ahd_platform_free(struct ahd_softc *ahd); | |||
678 | void ahd_platform_init(struct ahd_softc *ahd); | 678 | void ahd_platform_init(struct ahd_softc *ahd); |
679 | void ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb); | 679 | void ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb); |
680 | 680 | ||
681 | static __inline void | 681 | static inline void |
682 | ahd_freeze_scb(struct scb *scb) | 682 | ahd_freeze_scb(struct scb *scb) |
683 | { | 683 | { |
684 | if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) { | 684 | if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) { |