aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sn/ioc3.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-03-13 23:36:52 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-03-13 23:36:52 -0500
commit58a343f22e8ef987b90e34bbef7f1455e3bb5a15 (patch)
treefc811fb570639f2083df6d9191b6a8d7cff65352 /drivers/sn/ioc3.c
parent51c38f9bce274a1e8a90aa457fb433be738f7458 (diff)
parent3759fa9c55923f719ae944a3f8fbb029b36f759d (diff)
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/sn/ioc3.c')
-rw-r--r--drivers/sn/ioc3.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c
index 12357e1fa558..93449a1a0065 100644
--- a/drivers/sn/ioc3.c
+++ b/drivers/sn/ioc3.c
@@ -62,7 +62,7 @@ static int nic_reset(struct ioc3_driver_data *idd)
62 return presence; 62 return presence;
63} 63}
64 64
65static inline int nic_read_bit(struct ioc3_driver_data *idd) 65static int nic_read_bit(struct ioc3_driver_data *idd)
66{ 66{
67 int result; 67 int result;
68 unsigned long flags; 68 unsigned long flags;
@@ -77,7 +77,7 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd)
77 return result; 77 return result;
78} 78}
79 79
80static inline void nic_write_bit(struct ioc3_driver_data *idd, int bit) 80static void nic_write_bit(struct ioc3_driver_data *idd, int bit)
81{ 81{
82 if (bit) 82 if (bit)
83 writel(mcr_pack(6, 110), &idd->vma->mcr); 83 writel(mcr_pack(6, 110), &idd->vma->mcr);
@@ -371,8 +371,7 @@ static void probe_nic(struct ioc3_driver_data *idd)
371 371
372/* Interrupts */ 372/* Interrupts */
373 373
374static inline void 374static void write_ireg(struct ioc3_driver_data *idd, uint32_t val, int which)
375write_ireg(struct ioc3_driver_data *idd, uint32_t val, int which)
376{ 375{
377 unsigned long flags; 376 unsigned long flags;
378 377
@@ -735,14 +734,12 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
735 } 734 }
736 735
737 /* Add this IOC3 to all submodules */ 736 /* Add this IOC3 to all submodules */
738 read_lock(&ioc3_submodules_lock);
739 for(id=0;id<IOC3_MAX_SUBMODULES;id++) 737 for(id=0;id<IOC3_MAX_SUBMODULES;id++)
740 if(ioc3_submodules[id] && ioc3_submodules[id]->probe) { 738 if(ioc3_submodules[id] && ioc3_submodules[id]->probe) {
741 idd->active[id] = 1; 739 idd->active[id] = 1;
742 idd->active[id] = !ioc3_submodules[id]->probe 740 idd->active[id] = !ioc3_submodules[id]->probe
743 (ioc3_submodules[id], idd); 741 (ioc3_submodules[id], idd);
744 } 742 }
745 read_unlock(&ioc3_submodules_lock);
746 743
747 printk(KERN_INFO "IOC3 Master Driver loaded for %s\n", pci_name(pdev)); 744 printk(KERN_INFO "IOC3 Master Driver loaded for %s\n", pci_name(pdev));
748 745
@@ -767,7 +764,6 @@ static void ioc3_remove(struct pci_dev *pdev)
767 idd = pci_get_drvdata(pdev); 764 idd = pci_get_drvdata(pdev);
768 765
769 /* Remove this IOC3 from all submodules */ 766 /* Remove this IOC3 from all submodules */
770 read_lock(&ioc3_submodules_lock);
771 for(id=0;id<IOC3_MAX_SUBMODULES;id++) 767 for(id=0;id<IOC3_MAX_SUBMODULES;id++)
772 if(idd->active[id]) { 768 if(idd->active[id]) {
773 if(ioc3_submodules[id] && ioc3_submodules[id]->remove) 769 if(ioc3_submodules[id] && ioc3_submodules[id]->remove)
@@ -781,7 +777,6 @@ static void ioc3_remove(struct pci_dev *pdev)
781 pci_name(pdev)); 777 pci_name(pdev));
782 idd->active[id] = 0; 778 idd->active[id] = 0;
783 } 779 }
784 read_unlock(&ioc3_submodules_lock);
785 780
786 /* Clear and disable all IRQs */ 781 /* Clear and disable all IRQs */
787 write_ireg(idd, ~0, IOC3_W_IEC); 782 write_ireg(idd, ~0, IOC3_W_IEC);