Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
96a3b847
Commit
96a3b847
authored
Apr 30, 2004
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix errors in [PATCH] aic7xxx: fix oops whe hardware is not present
This patch was causing a boot panic. Now fixed.
parent
5053dc60
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
25 deletions
+26
-25
drivers/scsi/aic7xxx/aic7770_osm.c
drivers/scsi/aic7xxx/aic7770_osm.c
+4
-4
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
+10
-21
drivers/scsi/aic7xxx/aic7xxx_osm.h
drivers/scsi/aic7xxx/aic7xxx_osm.h
+12
-0
No files found.
drivers/scsi/aic7xxx/aic7770_osm.c
View file @
96a3b847
...
...
@@ -159,10 +159,10 @@ ahc_linux_eisa_init(void)
void
ahc_linux_eisa_exit
(
void
)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
eisa_driver_unregister
(
&
aic7770_driver
);
free
(
aic7770_driver
.
id_table
,
M_DEVBUF
);
#endif
if
(
aic7xxx_probe_eisa_vl
!=
0
&&
aic7770_driver
.
id_table
!=
NULL
)
{
eisa_driver_unregister
(
&
aic7770_driver
);
free
(
aic7770_driver
.
id_table
,
M_DEVBUF
);
}
}
static
int
...
...
drivers/scsi/aic7xxx/aic7xxx_osm.c
View file @
96a3b847
...
...
@@ -843,7 +843,8 @@ static int
ahc_linux_detect
(
Scsi_Host_Template
*
template
)
{
struct
ahc_softc
*
ahc
;
int
found
;
int
found
=
0
;
int
eisa_err
,
pci_err
;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
/*
...
...
@@ -891,21 +892,12 @@ ahc_linux_detect(Scsi_Host_Template *template)
*/
ahc_list_lockinit
();
#ifdef CONFIG_PCI
found
=
ahc_linux_pci_init
();
if
(
found
)
goto
out
;
#endif
pci_err
=
ahc_linux_pci_init
();
eisa_err
=
ahc_linux_eisa_init
();
#ifdef CONFIG_EISA
found
=
ahc_linux_eisa_init
();
if
(
found
)
{
#ifdef CONFIG_PCI
ahc_linux_pci_exit
();
#endif
if
(
pci_err
&&
eisa_err
)
goto
out
;
}
#endif
/*
* Register with the SCSI layer all
...
...
@@ -916,12 +908,13 @@ ahc_linux_detect(Scsi_Host_Template *template)
if
(
ahc_linux_register_host
(
ahc
,
template
)
==
0
)
found
++
;
}
out:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
spin_lock_irq
(
&
io_request_lock
);
#endif
aic7xxx_detect_complete
++
;
out:
return
(
found
);
}
...
...
@@ -5078,7 +5071,7 @@ ahc_platform_dump_card_state(struct ahc_softc *ahc)
}
}
static
void
__exit
ahc_linux_exit
(
void
);
static
void
ahc_linux_exit
(
void
);
static
int
__init
ahc_linux_init
(
void
)
...
...
@@ -5101,7 +5094,7 @@ ahc_linux_init(void)
#endif
}
static
void
__exit
static
void
ahc_linux_exit
(
void
)
{
struct
ahc_softc
*
ahc
;
...
...
@@ -5128,12 +5121,8 @@ ahc_linux_exit(void)
*/
scsi_unregister_module
(
MODULE_SCSI_HA
,
&
aic7xxx_driver_template
);
#endif
#ifdef CONFIG_PCI
ahc_linux_pci_exit
();
#endif
#ifdef CONFIG_EISA
ahc_linux_eisa_exit
();
#endif
}
module_init
(
ahc_linux_init
);
...
...
drivers/scsi/aic7xxx/aic7xxx_osm.h
View file @
96a3b847
...
...
@@ -845,6 +845,12 @@ void ahc_linux_eisa_exit(void);
int
aic7770_map_registers
(
struct
ahc_softc
*
ahc
,
u_int
port
);
int
aic7770_map_int
(
struct
ahc_softc
*
ahc
,
u_int
irq
);
#else
static
inline
int
ahc_linux_eisa_init
(
void
)
{
return
-
ENODEV
;
}
static
inline
void
ahc_linux_eisa_exit
(
void
)
{
}
#endif
/******************************* PCI Routines *********************************/
...
...
@@ -932,6 +938,12 @@ ahc_get_pci_bus(ahc_dev_softc_t pci)
{
return
(
pci
->
bus
->
number
);
}
#else
static
inline
int
ahc_linux_pci_init
(
void
)
{
return
-
ENODEV
;
}
static
inline
void
ahc_linux_pci_exit
(
void
)
{
}
#endif
static
__inline
void
ahc_flush_device_writes
(
struct
ahc_softc
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment