diff options
Diffstat (limited to 'drivers/message')
-rw-r--r-- | drivers/message/fusion/mptlan.c | 36 | ||||
-rw-r--r-- | drivers/message/fusion/mptsas.c | 7 | ||||
-rw-r--r-- | drivers/message/i2o/i2o_block.c | 12 |
3 files changed, 25 insertions, 30 deletions
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c index b691292ff599..7dd34bd28efc 100644 --- a/drivers/message/fusion/mptlan.c +++ b/drivers/message/fusion/mptlan.c | |||
@@ -714,6 +714,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev) | |||
714 | LANSendRequest_t *pSendReq; | 714 | LANSendRequest_t *pSendReq; |
715 | SGETransaction32_t *pTrans; | 715 | SGETransaction32_t *pTrans; |
716 | SGESimple64_t *pSimple; | 716 | SGESimple64_t *pSimple; |
717 | const unsigned char *mac; | ||
717 | dma_addr_t dma; | 718 | dma_addr_t dma; |
718 | unsigned long flags; | 719 | unsigned long flags; |
719 | int ctx; | 720 | int ctx; |
@@ -753,7 +754,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev) | |||
753 | /* Set the mac.raw pointer, since this apparently isn't getting | 754 | /* Set the mac.raw pointer, since this apparently isn't getting |
754 | * done before we get the skb. Pull the data pointer past the mac data. | 755 | * done before we get the skb. Pull the data pointer past the mac data. |
755 | */ | 756 | */ |
756 | skb->mac.raw = skb->data; | 757 | skb_reset_mac_header(skb); |
757 | skb_pull(skb, 12); | 758 | skb_pull(skb, 12); |
758 | 759 | ||
759 | dma = pci_map_single(mpt_dev->pcidev, skb->data, skb->len, | 760 | dma = pci_map_single(mpt_dev->pcidev, skb->data, skb->len, |
@@ -784,6 +785,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev) | |||
784 | // IOC_AND_NETDEV_NAMES_s_s(dev), | 785 | // IOC_AND_NETDEV_NAMES_s_s(dev), |
785 | // ctx, skb, skb->data)); | 786 | // ctx, skb, skb->data)); |
786 | 787 | ||
788 | mac = skb_mac_header(skb); | ||
787 | #ifdef QLOGIC_NAA_WORKAROUND | 789 | #ifdef QLOGIC_NAA_WORKAROUND |
788 | { | 790 | { |
789 | struct NAA_Hosed *nh; | 791 | struct NAA_Hosed *nh; |
@@ -793,12 +795,12 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev) | |||
793 | drops. */ | 795 | drops. */ |
794 | read_lock_irq(&bad_naa_lock); | 796 | read_lock_irq(&bad_naa_lock); |
795 | for (nh = mpt_bad_naa; nh != NULL; nh=nh->next) { | 797 | for (nh = mpt_bad_naa; nh != NULL; nh=nh->next) { |
796 | if ((nh->ieee[0] == skb->mac.raw[0]) && | 798 | if ((nh->ieee[0] == mac[0]) && |
797 | (nh->ieee[1] == skb->mac.raw[1]) && | 799 | (nh->ieee[1] == mac[1]) && |
798 | (nh->ieee[2] == skb->mac.raw[2]) && | 800 | (nh->ieee[2] == mac[2]) && |
799 | (nh->ieee[3] == skb->mac.raw[3]) && | 801 | (nh->ieee[3] == mac[3]) && |
800 | (nh->ieee[4] == skb->mac.raw[4]) && | 802 | (nh->ieee[4] == mac[4]) && |
801 | (nh->ieee[5] == skb->mac.raw[5])) { | 803 | (nh->ieee[5] == mac[5])) { |
802 | cur_naa = nh->NAA; | 804 | cur_naa = nh->NAA; |
803 | dlprintk ((KERN_INFO "mptlan/sdu_send: using NAA value " | 805 | dlprintk ((KERN_INFO "mptlan/sdu_send: using NAA value " |
804 | "= %04x.\n", cur_naa)); | 806 | "= %04x.\n", cur_naa)); |
@@ -810,12 +812,12 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev) | |||
810 | #endif | 812 | #endif |
811 | 813 | ||
812 | pTrans->TransactionDetails[0] = cpu_to_le32((cur_naa << 16) | | 814 | pTrans->TransactionDetails[0] = cpu_to_le32((cur_naa << 16) | |
813 | (skb->mac.raw[0] << 8) | | 815 | (mac[0] << 8) | |
814 | (skb->mac.raw[1] << 0)); | 816 | (mac[1] << 0)); |
815 | pTrans->TransactionDetails[1] = cpu_to_le32((skb->mac.raw[2] << 24) | | 817 | pTrans->TransactionDetails[1] = cpu_to_le32((mac[2] << 24) | |
816 | (skb->mac.raw[3] << 16) | | 818 | (mac[3] << 16) | |
817 | (skb->mac.raw[4] << 8) | | 819 | (mac[4] << 8) | |
818 | (skb->mac.raw[5] << 0)); | 820 | (mac[5] << 0)); |
819 | 821 | ||
820 | pSimple = (SGESimple64_t *) &pTrans->TransactionDetails[2]; | 822 | pSimple = (SGESimple64_t *) &pTrans->TransactionDetails[2]; |
821 | 823 | ||
@@ -930,7 +932,7 @@ mpt_lan_receive_post_turbo(struct net_device *dev, u32 tmsg) | |||
930 | pci_dma_sync_single_for_cpu(mpt_dev->pcidev, priv->RcvCtl[ctx].dma, | 932 | pci_dma_sync_single_for_cpu(mpt_dev->pcidev, priv->RcvCtl[ctx].dma, |
931 | priv->RcvCtl[ctx].len, PCI_DMA_FROMDEVICE); | 933 | priv->RcvCtl[ctx].len, PCI_DMA_FROMDEVICE); |
932 | 934 | ||
933 | memcpy(skb_put(skb, len), old_skb->data, len); | 935 | skb_copy_from_linear_data(old_skb, skb_put(skb, len), len); |
934 | 936 | ||
935 | pci_dma_sync_single_for_device(mpt_dev->pcidev, priv->RcvCtl[ctx].dma, | 937 | pci_dma_sync_single_for_device(mpt_dev->pcidev, priv->RcvCtl[ctx].dma, |
936 | priv->RcvCtl[ctx].len, PCI_DMA_FROMDEVICE); | 938 | priv->RcvCtl[ctx].len, PCI_DMA_FROMDEVICE); |
@@ -1091,7 +1093,7 @@ mpt_lan_receive_post_reply(struct net_device *dev, | |||
1091 | priv->RcvCtl[ctx].dma, | 1093 | priv->RcvCtl[ctx].dma, |
1092 | priv->RcvCtl[ctx].len, | 1094 | priv->RcvCtl[ctx].len, |
1093 | PCI_DMA_FROMDEVICE); | 1095 | PCI_DMA_FROMDEVICE); |
1094 | memcpy(skb_put(skb, l), old_skb->data, l); | 1096 | skb_copy_from_linear_data(old_skb, skb_put(skb, l), l); |
1095 | 1097 | ||
1096 | pci_dma_sync_single_for_device(mpt_dev->pcidev, | 1098 | pci_dma_sync_single_for_device(mpt_dev->pcidev, |
1097 | priv->RcvCtl[ctx].dma, | 1099 | priv->RcvCtl[ctx].dma, |
@@ -1120,7 +1122,7 @@ mpt_lan_receive_post_reply(struct net_device *dev, | |||
1120 | priv->RcvCtl[ctx].len, | 1122 | priv->RcvCtl[ctx].len, |
1121 | PCI_DMA_FROMDEVICE); | 1123 | PCI_DMA_FROMDEVICE); |
1122 | 1124 | ||
1123 | memcpy(skb_put(skb, len), old_skb->data, len); | 1125 | skb_copy_from_linear_data(old_skb, skb_put(skb, len), len); |
1124 | 1126 | ||
1125 | pci_dma_sync_single_for_device(mpt_dev->pcidev, | 1127 | pci_dma_sync_single_for_device(mpt_dev->pcidev, |
1126 | priv->RcvCtl[ctx].dma, | 1128 | priv->RcvCtl[ctx].dma, |
@@ -1549,7 +1551,7 @@ mpt_lan_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
1549 | struct mpt_lan_ohdr *fch = (struct mpt_lan_ohdr *)skb->data; | 1551 | struct mpt_lan_ohdr *fch = (struct mpt_lan_ohdr *)skb->data; |
1550 | struct fcllc *fcllc; | 1552 | struct fcllc *fcllc; |
1551 | 1553 | ||
1552 | skb->mac.raw = skb->data; | 1554 | skb_reset_mac_header(skb); |
1553 | skb_pull(skb, sizeof(struct mpt_lan_ohdr)); | 1555 | skb_pull(skb, sizeof(struct mpt_lan_ohdr)); |
1554 | 1556 | ||
1555 | if (fch->dtype == htons(0xffff)) { | 1557 | if (fch->dtype == htons(0xffff)) { |
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 404c014db1bd..1d2d03f77894 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -815,7 +815,7 @@ mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) | |||
815 | static int | 815 | static int |
816 | mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | 816 | mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) |
817 | { | 817 | { |
818 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; | 818 | MPT_SCSI_HOST *hd; |
819 | struct mptsas_target_reset_event *target_reset_list, *n; | 819 | struct mptsas_target_reset_event *target_reset_list, *n; |
820 | int rc; | 820 | int rc; |
821 | 821 | ||
@@ -827,7 +827,10 @@ mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | |||
827 | if (reset_phase != MPT_IOC_POST_RESET) | 827 | if (reset_phase != MPT_IOC_POST_RESET) |
828 | goto out; | 828 | goto out; |
829 | 829 | ||
830 | if (!hd || !hd->ioc) | 830 | if (!ioc->sh || !ioc->sh->hostdata) |
831 | goto out; | ||
832 | hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; | ||
833 | if (!hd->ioc) | ||
831 | goto out; | 834 | goto out; |
832 | 835 | ||
833 | if (list_empty(&hd->target_reset_list)) | 836 | if (list_empty(&hd->target_reset_list)) |
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index da9859f2caf2..b17c4b2bc9ef 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c | |||
@@ -390,13 +390,6 @@ static int i2o_block_prep_req_fn(struct request_queue *q, struct request *req) | |||
390 | return BLKPREP_KILL; | 390 | return BLKPREP_KILL; |
391 | } | 391 | } |
392 | 392 | ||
393 | /* request is already processed by us, so return */ | ||
394 | if (blk_special_request(req)) { | ||
395 | osm_debug("REQ_SPECIAL already set!\n"); | ||
396 | req->cmd_flags |= REQ_DONTPREP; | ||
397 | return BLKPREP_OK; | ||
398 | } | ||
399 | |||
400 | /* connect the i2o_block_request to the request */ | 393 | /* connect the i2o_block_request to the request */ |
401 | if (!req->special) { | 394 | if (!req->special) { |
402 | ireq = i2o_block_request_alloc(); | 395 | ireq = i2o_block_request_alloc(); |
@@ -408,11 +401,8 @@ static int i2o_block_prep_req_fn(struct request_queue *q, struct request *req) | |||
408 | ireq->i2o_blk_dev = i2o_blk_dev; | 401 | ireq->i2o_blk_dev = i2o_blk_dev; |
409 | req->special = ireq; | 402 | req->special = ireq; |
410 | ireq->req = req; | 403 | ireq->req = req; |
411 | } else | 404 | } |
412 | ireq = req->special; | ||
413 | |||
414 | /* do not come back here */ | 405 | /* do not come back here */ |
415 | req->cmd_type = REQ_TYPE_SPECIAL; | ||
416 | req->cmd_flags |= REQ_DONTPREP; | 406 | req->cmd_flags |= REQ_DONTPREP; |
417 | 407 | ||
418 | return BLKPREP_OK; | 408 | return BLKPREP_OK; |