* [lm-sensors] PIIX4 and fix_hstcfg
From: Jean Delvare @ 2006-04-01 18:54 UTC (permalink / raw)
To: lm-sensors
In-Reply-To: <442E9B64.50909@sh.cvut.cz>
Hi Rudolf, Tom,
> > Note that I just use this as a crashbox now so if it's more trouble than
> > it's worth, I wouldn't mind it being dropped.
>
> Thanks for the lspci. It seems it has no PCI subsystem ID regs???
> Because of this much easier would be just drop.
Maybe we can use DMI instead. Tom, can you please provide the output of
dmidecode for this system? Maybe others still use it.
Tom, do you remember if any other system ever needed this option?
> I will drop the param + the warning of course.
If we do that, we must update the documentation and maybe have a
dedicated section for the faulty system. I guess that setpci can be
used to change the register value?
Thanks,
--
Jean Delvare
^ permalink raw reply
* Re: about __ARCH_WANT_SYS_GETHOSTNAME
From: Eric W. Biederman @ 2006-04-01 18:53 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: linux-kernel
In-Reply-To: <Pine.LNX.4.58.0603310911260.6105@shark.he.net>
"Randy.Dunlap" <rdunlap@xenotime.net> writes:
> Hi,
>
> What was/is the purpose of __ARCH_WANT_SYS_GETHOSTNAME?
> and why do a few arches not #define it?
>
> If it is not #defined, should those arches supply their own
> sys_gethostname() function?
>
> 21 arches #define __ARCH_WANT_SYS_GETHOSTNAME.
> A few don't: frv, ia64, & xtensa.
> But all arches (except for um) #define __NR_gethostname.
>
> Is __ARCH_WANT_SYS_GETHOSTNAME just crufty and doesn't matter
> any more?
I know you can implement it by simply calling uname.
Beyond that I am puzzled.
Eric
^ permalink raw reply
* [PATCH 2.6.16-mm2 1/4] sched_domain - handle kmalloc failure
From: Srivatsa Vaddagiri @ 2006-04-01 18:52 UTC (permalink / raw)
To: Andrew Morton, Ingo Molnar, Nick Piggin
Cc: suresh.b.siddha, Dinakar Guniguntala, pj, hawkes, linux-kernel
Andrew/Nick/Ingo,
Here's a different version of the patch that tries to handle mem
allocation failures in build_sched_domains by bailing out and cleaning up
thus-far allocated memory. The patch has a direct consequence that we disable
load balancing completely (even at sibling level) upon *any* memory allocation
failure. Is that acceptable?
Patch (against 2.6.16-mm2) to handle memory allocation failure in
build_sched_domains.
Signed-off-by: Srivatsa Vaddagir <vatsa@in.ibm.com>
diff -puN kernel/sched.c~sd_handle_error kernel/sched.c
--- linux-2.6.16-mm2/kernel/sched.c~sd_handle_error 2006-04-01 23:36:43.000000000 +0530
+++ linux-2.6.16-mm2-root/kernel/sched.c 2006-04-01 23:37:35.000000000 +0530
@@ -6061,11 +6061,56 @@ next_sg:
}
#endif
+/* Free memory allocated for various sched_group structures */
+static void free_sched_groups(const cpumask_t *cpu_map)
+{
+#ifdef CONFIG_NUMA
+ int i;
+ int cpu;
+
+ for_each_cpu_mask(cpu, *cpu_map) {
+ struct sched_group *sched_group_allnodes
+ = sched_group_allnodes_bycpu[cpu];
+ struct sched_group **sched_group_nodes
+ = sched_group_nodes_bycpu[cpu];
+
+ if (sched_group_allnodes) {
+ kfree(sched_group_allnodes);
+ sched_group_allnodes_bycpu[cpu] = NULL;
+ }
+
+ if (!sched_group_nodes)
+ continue;
+
+ for (i = 0; i < MAX_NUMNODES; i++) {
+ cpumask_t nodemask = node_to_cpumask(i);
+ struct sched_group *oldsg, *sg = sched_group_nodes[i];
+
+ cpus_and(nodemask, nodemask, *cpu_map);
+ if (cpus_empty(nodemask))
+ continue;
+
+ if (sg == NULL)
+ continue;
+ sg = sg->next;
+next_sg:
+ oldsg = sg;
+ sg = sg->next;
+ kfree(oldsg);
+ if (oldsg != sched_group_nodes[i])
+ goto next_sg;
+ }
+ kfree(sched_group_nodes);
+ sched_group_nodes_bycpu[cpu] = NULL;
+ }
+#endif
+}
+
/*
* Build sched domains for a given set of cpus and attach the sched domains
* to the individual cpus
*/
-void build_sched_domains(const cpumask_t *cpu_map)
+static int build_sched_domains(const cpumask_t *cpu_map)
{
int i;
#ifdef CONFIG_NUMA
@@ -6075,11 +6120,11 @@ void build_sched_domains(const cpumask_t
/*
* Allocate the per-node list of sched groups
*/
- sched_group_nodes = kmalloc(sizeof(struct sched_group*)*MAX_NUMNODES,
+ sched_group_nodes = kzalloc(sizeof(struct sched_group*)*MAX_NUMNODES,
GFP_ATOMIC);
if (!sched_group_nodes) {
printk(KERN_WARNING "Can not alloc sched group node list\n");
- return;
+ return -ENOMEM;
}
sched_group_nodes_bycpu[first_cpu(*cpu_map)] = sched_group_nodes;
#endif
@@ -6105,7 +6150,7 @@ void build_sched_domains(const cpumask_t
if (!sched_group_allnodes) {
printk(KERN_WARNING
"Can not alloc allnodes sched group\n");
- break;
+ goto error;
}
sched_group_allnodes_bycpu[i]
= sched_group_allnodes;
@@ -6219,23 +6264,20 @@ void build_sched_domains(const cpumask_t
cpus_and(domainspan, domainspan, *cpu_map);
sg = kmalloc(sizeof(struct sched_group), GFP_KERNEL);
+ if (!sg) {
+ printk(KERN_WARNING
+ "Can not alloc domain group for node %d\n", i);
+ goto error;
+ }
sched_group_nodes[i] = sg;
for_each_cpu_mask(j, nodemask) {
struct sched_domain *sd;
sd = &per_cpu(node_domains, j);
sd->groups = sg;
- if (sd->groups == NULL) {
- /* Turn off balancing if we have no groups */
- sd->flags = 0;
- }
- }
- if (!sg) {
- printk(KERN_WARNING
- "Can not alloc domain group for node %d\n", i);
- continue;
}
sg->cpu_power = 0;
sg->cpumask = nodemask;
+ sg->next = sg;
cpus_or(covered, covered, nodemask);
prev = sg;
@@ -6258,15 +6300,15 @@ void build_sched_domains(const cpumask_t
if (!sg) {
printk(KERN_WARNING
"Can not alloc domain group for node %d\n", j);
- break;
+ goto error;
}
sg->cpu_power = 0;
sg->cpumask = tmp;
+ sg->next = prev;
cpus_or(covered, covered, tmp);
prev->next = sg;
prev = sg;
}
- prev->next = sched_group_nodes[i];
}
#endif
@@ -6329,13 +6371,22 @@ void build_sched_domains(const cpumask_t
* Tune cache-hot values:
*/
calibrate_migration_costs(cpu_map);
+
+ return 0;
+
+#ifdef CONFIG_NUMA
+error:
+ free_sched_groups(cpu_map);
+ return -ENOMEM;
+#endif
}
/*
* Set up scheduler domains and groups. Callers must hold the hotplug lock.
*/
-static void arch_init_sched_domains(const cpumask_t *cpu_map)
+static int arch_init_sched_domains(const cpumask_t *cpu_map)
{
cpumask_t cpu_default_map;
+ int err;
/*
* Setup mask for cpus without special case scheduling requirements.
@@ -6344,51 +6395,14 @@ static void arch_init_sched_domains(cons
*/
cpus_andnot(cpu_default_map, *cpu_map, cpu_isolated_map);
- build_sched_domains(&cpu_default_map);
+ err = build_sched_domains(&cpu_default_map);
+
+ return err;
}
static void arch_destroy_sched_domains(const cpumask_t *cpu_map)
{
-#ifdef CONFIG_NUMA
- int i;
- int cpu;
-
- for_each_cpu_mask(cpu, *cpu_map) {
- struct sched_group *sched_group_allnodes
- = sched_group_allnodes_bycpu[cpu];
- struct sched_group **sched_group_nodes
- = sched_group_nodes_bycpu[cpu];
-
- if (sched_group_allnodes) {
- kfree(sched_group_allnodes);
- sched_group_allnodes_bycpu[cpu] = NULL;
- }
-
- if (!sched_group_nodes)
- continue;
-
- for (i = 0; i < MAX_NUMNODES; i++) {
- cpumask_t nodemask = node_to_cpumask(i);
- struct sched_group *oldsg, *sg = sched_group_nodes[i];
-
- cpus_and(nodemask, nodemask, *cpu_map);
- if (cpus_empty(nodemask))
- continue;
-
- if (sg == NULL)
- continue;
- sg = sg->next;
-next_sg:
- oldsg = sg;
- sg = sg->next;
- kfree(oldsg);
- if (oldsg != sched_group_nodes[i])
- goto next_sg;
- }
- kfree(sched_group_nodes);
- sched_group_nodes_bycpu[cpu] = NULL;
- }
-#endif
+ free_sched_groups(cpu_map);
}
/*
@@ -6413,9 +6427,10 @@ static void detach_destroy_domains(const
* correct sched domains
* Call with hotplug lock held
*/
-void partition_sched_domains(cpumask_t *partition1, cpumask_t *partition2)
+int partition_sched_domains(cpumask_t *partition1, cpumask_t *partition2)
{
cpumask_t change_map;
+ int err = 0;
cpus_and(*partition1, *partition1, cpu_online_map);
cpus_and(*partition2, *partition2, cpu_online_map);
@@ -6424,9 +6439,11 @@ void partition_sched_domains(cpumask_t *
/* Detach sched domains from all of the affected cpus */
detach_destroy_domains(&change_map);
if (!cpus_empty(*partition1))
- build_sched_domains(partition1);
- if (!cpus_empty(*partition2))
- build_sched_domains(partition2);
+ err = build_sched_domains(partition1);
+ if (!err && !cpus_empty(*partition2))
+ err = build_sched_domains(partition2);
+
+ return err;
}
#ifdef CONFIG_HOTPLUG_CPU
diff -puN include/linux/sched.h~sd_handle_error include/linux/sched.h
--- linux-2.6.16-mm2/include/linux/sched.h~sd_handle_error 2006-04-01 23:36:43.000000000 +0530
+++ linux-2.6.16-mm2-root/include/linux/sched.h 2006-04-01 23:36:43.000000000 +0530
@@ -632,7 +632,7 @@ struct sched_domain {
#endif
};
-extern void partition_sched_domains(cpumask_t *partition1,
+extern int partition_sched_domains(cpumask_t *partition1,
cpumask_t *partition2);
/*
_
--
Regards,
vatsa
^ permalink raw reply
* Re: Avoid excessive time spend on concurrent slab shrinking
From: Christoph Lameter @ 2006-04-01 18:49 UTC (permalink / raw)
To: David Chinner; +Cc: Nathan Scott, Andrew Morton, nickpiggin, linux-mm, dgc
In-Reply-To: <20060401183038.GY27189130@melbourne.sgi.com>
On Sun, 2 Apr 2006, David Chinner wrote:
> same hash chain, which tends to implicate not enough hash buckets.
>
> > If its useful for experimenting, Christoph, you can easily tweak the
> > cluster hash size manually by dinking with xfs_iget.c::xfs_chash_init.
>
> Just use the ihashsize mount option - the cluster hash size is proportional
> to the inode hash size which is changed by the ihashsize mount option.
>
> Cheers,
XFS settings visible via /proc/mounts are
rw,ihashsize=32768,sunit=32,swidth=25
Not enough hash buckets? This was the default selection by xfs.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* [Bluez-users] Solved (was Re: Bluetooth: pand: Connection failed. File exists(17))
From: Geoff Shang @ 2006-04-01 18:45 UTC (permalink / raw)
To: Linux for blind general discussion; +Cc: general, bluez-users
In-Reply-To: <Pine.LNX.4.64.0603181246420.738@data.home>
Geoff Shang wrote:
> When I try to connect from the panu, I get the following:
>
> Mar 10 18:35:46 data pand[16077]: Connection failed. File exists(17)
This was a case of brain failure on my part. I failed to understand that
pand merely instructs the kernel and the hardware, rather than actually
maintain the connections. This is unlike PPPd, for example. So a PAN
connection will remain even if PANd is shut down.
The reason why I was getting the error is that I was trying to create a
connection that already existed. I was able to verify this with "pand -l".
I admit that the somewhat unhelpful error message had me chasing red
herrings for awhile.
Thanks to those of you who, through your suggestions, nudged me in the
right direction.
Geoff.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply
* [patch 2.6.16-git] dma doc updates
From: David Brownell @ 2006-04-01 18:21 UTC (permalink / raw)
To: Linux Kernel list; +Cc: Greg KH
[-- Attachment #1: Type: text/plain, Size: 347 bytes --]
This updates docs to clarify some points:
- dma_*map_sg() usage, mostly cloning text from the pci-specific writeup
- mention cpu (and pci bridge) write buffers as cases where having memory
mapped as dma-coherent isn't sufficient for correctness;
- mention cacheline coherence issues for systems with dma-unaware caches.
Please merge ...
[-- Attachment #2: dma-doc.patch --]
[-- Type: text/x-diff, Size: 6389 bytes --]
This updates the DMA API documentation to address a few issues:
- The dma_map_sg() call results are used like pci_map_sg() results:
using sg_dma_address() and sg_dma_len(). That's not wholly obvious
to folk reading _only_ the "new" DMA-API.txt writeup.
- Buffers allocated by dma_alloc_coherent() may not be completely
free of coherency concerns ... some CPUs also have write buffers
that may need to be flushed.
- Cacheline coherence issues are now mentioned as being among issues
which affect dma buffers, and complicate/prevent using of static and
(especially) stack based buffers with the DMA calls.
I don't think many drivers currently need to worry about flushing write
buffers, but I did hit it with one SOC using external SDRAM for DMA
descriptors: without explicit writebuffer flushing, the on-chip DMA
controller accessed descriptors before the CPU completed the writes.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Index: g26/Documentation/DMA-API.txt
===================================================================
--- g26.orig/Documentation/DMA-API.txt 2006-03-31 22:24:55.000000000 -0800
+++ g26/Documentation/DMA-API.txt 2006-03-31 22:42:37.000000000 -0800
@@ -33,7 +33,9 @@ pci_alloc_consistent(struct pci_dev *dev
Consistent memory is memory for which a write by either the device or
the processor can immediately be read by the processor or device
-without having to worry about caching effects.
+without having to worry about caching effects. (You may however need
+to make sure to flush the processor's write buffers before telling
+devices to read that memory.)
This routine allocates a region of <size> bytes of consistent memory.
it also returns a <dma_handle> which may be cast to an unsigned
@@ -304,12 +306,12 @@ dma address with dma_mapping_error(). A
could not be created and the driver should take appropriate action (eg
reduce current DMA mapping usage or delay and try again later).
-int
-dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
- enum dma_data_direction direction)
-int
-pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
- int nents, int direction)
+ int
+ dma_map_sg(struct device *dev, struct scatterlist *sg,
+ int nents, enum dma_data_direction direction)
+ int
+ pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
+ int nents, int direction)
Maps a scatter gather list from the block layer.
@@ -327,12 +329,33 @@ critical that the driver do something, i
aborting the request or even oopsing is better than doing nothing and
corrupting the filesystem.
-void
-dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
- enum dma_data_direction direction)
-void
-pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
- int nents, int direction)
+With scatterlists, you use the resulting mapping like this:
+
+ int i, count = dma_map_sg(dev, sglist, nents, direction);
+ struct scatterlist *sg;
+
+ for (i = 0, sg = sglist; i < count; i++, sg++) {
+ hw_address[i] = sg_dma_address(sg);
+ hw_len[i] = sg_dma_len(sg);
+ }
+
+where nents is the number of entries in the sglist.
+
+The implementation is free to merge several consecutive sglist entries
+into one (e.g. with an IOMMU, or if several pages just happen to be
+physically contiguous) and returns the actual number of sg entries it
+mapped them to. On failure 0, is returned.
+
+Then you should loop count times (note: this can be less than nents times)
+and use sg_dma_address() and sg_dma_len() macros where you previously
+accessed sg->address and sg->length as shown above.
+
+ void
+ dma_unmap_sg(struct device *dev, struct scatterlist *sg,
+ int nhwentries, enum dma_data_direction direction)
+ void
+ pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
+ int nents, int direction)
unmap the previously mapped scatter/gather list. All the parameters
must be the same as those and passed in to the scatter/gather mapping
Index: g26/Documentation/DMA-mapping.txt
===================================================================
--- g26.orig/Documentation/DMA-mapping.txt 2006-03-31 22:35:29.000000000 -0800
+++ g26/Documentation/DMA-mapping.txt 2006-03-31 22:44:51.000000000 -0800
@@ -58,11 +58,15 @@ translating each of those pages back to
something like __va(). [ EDIT: Update this when we integrate
Gerd Knorr's generic code which does this. ]
-This rule also means that you may not use kernel image addresses
-(ie. items in the kernel's data/text/bss segment, or your driver's)
-nor may you use kernel stack addresses for DMA. Both of these items
-might be mapped somewhere entirely different than the rest of physical
-memory.
+This rule also means that you may use neither kernel image addresses
+(items in data/text/bss segments), nor module image addresses, nor
+stack addresses for DMA. These could all be mapped somewhere entirely
+different than the rest of physical memory. Even if those classes of
+memory could physically work with DMA, you'd need to ensure the I/O
+buffers were cacheline-aligned. Without that, you'd see cacheline
+sharing problems (data corruption) on CPUs with DMA-incoherent caches.
+(The CPU could write to one word, DMA would write to a different one
+in the same cache line, and one of them could be overwritten.)
Also, this means that you cannot take the return of a kmap()
call and DMA to/from that. This is similar to vmalloc().
@@ -284,6 +288,11 @@ There are two types of DMA mappings:
in order to get correct behavior on all platforms.
+ Also, on some platforms your driver may need to flush CPU write
+ buffers in much the same way as it needs to flush write buffers
+ found in PCI bridges (such as by reading a register's value
+ after writing it).
+
- Streaming DMA mappings which are usually mapped for one DMA transfer,
unmapped right after it (unless you use pci_dma_sync_* below) and for which
hardware can optimize for sequential accesses.
@@ -303,6 +312,9 @@ There are two types of DMA mappings:
Neither type of DMA mapping has alignment restrictions that come
from PCI, although some devices may have such restrictions.
+Also, systems with caches that aren't DMA-coherent will work better
+when the underlying buffers don't share cache lines with other data.
+
Using Consistent DMA mappings.
^ permalink raw reply
* Re: [CMT 00/16] qla4xxx: driver review ql4_iocb.c
From: Doug Maxey @ 2006-04-01 18:41 UTC (permalink / raw)
To: Ravi Anand; +Cc: Linux SCSI Mailing List
Mostly just kerneldoc issues.
In funcs with a local var definition assigns can be done at defn time.
++doug
--
diff --git a/drivers/scsi/qla4xxx/ql4_iocb.c b/drivers/scsi/qla4xxx/ql4_iocb.c
new file mode 100644
index 0000000..2621011
--- /dev/null
+++ b/drivers/scsi/qla4xxx/ql4_iocb.c
@@ -0,0 +1,537 @@
+/*
+ * QLogic iSCSI HBA Driver
+ * Copyright (c) 2003-2006 QLogic Corporation
+ *
+ * See LICENSE.qla4xxx for copyright and licensing details.
+ */
+
+#include "ql4_def.h"
+
+#include <scsi/scsi_tcq.h>
+
+/**************************************************************************
+ * qla4xxx_get_req_pkt
+ * This routine performs the following tasks:
+ * - returns the current request_in pointer (if queue not full)
+ * - advances the request_in pointer
+ * - checks for queue full
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * queue_entry - Pointer to pointer to queue entry structure
+ *
+ * Output:
+ * queue_entry - Return pointer to next available request packet
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully retrieved request packet
+ * QLA_ERROR - Failed to retrieve request packet
+ **************************************************************************/
-ENEEDSKERNELDOC
+int
+qla4xxx_get_req_pkt(scsi_qla_host_t *ha, QUEUE_ENTRY **queue_entry)
+{
+ uint16_t request_in;
+ uint8_t status = QLA_SUCCESS;
+
+ *queue_entry = ha->request_ptr;
+
+ /* get the latest request_in and request_out index */
+ request_in = ha->request_in;
+ ha->request_out = (uint16_t) le32_to_cpu(ha->shadow_regs->req_q_out);
+
+ /* Advance request queue pointer and check for queue full */
+ if (request_in == (REQUEST_QUEUE_DEPTH - 1)) {
+ request_in = 0;
+ ha->request_ptr = ha->request_ring;
+ } else {
+ request_in++;
+ ha->request_ptr++;
+ }
+
+ /* request queue is full, try again later */
+ if ((ha->iocb_cnt + 1) >= ha->iocb_hiwat) {
+ /* restore request pointer */
+ ha->request_ptr = *queue_entry;
+ status = QLA_ERROR;
+ } else {
+ ha->request_in = request_in;
+ memset(*queue_entry, 0, sizeof(**queue_entry));
+ }
+
+ return status;
+}
+
+/**************************************************************************
+ * qla4xxx_send_marker_iocb
+ * This routine issues a marker IOCB.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * ddb_entry - Pointer to device database entry
+ * lun - SCSI LUN
+ * marker_type - marker identifier
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully sent marker IOCB
+ * QLA_ERROR - Failed to send marker IOCB
+ **************************************************************************/
-ENEEDSKERNELDOC
+int
+qla4xxx_send_marker_iocb(scsi_qla_host_t *ha, ddb_entry_t *ddb_entry, int lun)
+{
+ MARKER_ENTRY *marker_entry;
+ unsigned long flags = 0;
+ uint8_t status = QLA_SUCCESS;
+
+ /* Acquire hardware specific lock */
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+
+ /* Get pointer to the queue entry for the marker */
+ if (qla4xxx_get_req_pkt(ha, (QUEUE_ENTRY **) &marker_entry) !=
+ QLA_SUCCESS) {
+ status = QLA_ERROR;
+ goto exit_send_marker;
+ }
+
+ /* Put the marker in the request queue */
+ marker_entry->hdr.entryType = ET_MARKER;
+ marker_entry->hdr.entryCount = 1;
+ marker_entry->target = cpu_to_le16(ddb_entry->fw_ddb_index);
+ marker_entry->modifier = cpu_to_le16(MM_LUN_RESET);
+ int_to_scsilun(lun, &marker_entry->lun);
+ wmb();
+
+ /* Tell ISP it's got a new I/O request */
+ WRT_REG_DWORD(&ha->reg->req_q_in, ha->request_in);
+ PCI_POSTING(&ha->reg->req_q_in);
+
+exit_send_marker:
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+ return status;
+}
+
+PDU_ENTRY *
+qla4xxx_get_pdu(scsi_qla_host_t * ha, uint32_t length)
+{
+ PDU_ENTRY *pdu;
+ PDU_ENTRY *free_pdu_top;
+ PDU_ENTRY *free_pdu_bottom;
+ uint16_t pdu_active;
+
+ if (ha->free_pdu_top == NULL)
+ return NULL;
+
+ /* Save current state */
+ free_pdu_top = ha->free_pdu_top;
+ free_pdu_bottom = ha->free_pdu_bottom;
+ pdu_active = ha->pdu_active + 1;
+
+ /* get next available pdu */
+ pdu = free_pdu_top;
+ free_pdu_top = pdu->Next;
+ if (free_pdu_top == NULL)
+ free_pdu_bottom = NULL;
+
+ /* round up to nearest page */
+ length = (length + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
+
+ /* Allocate pdu buffer PDU */
+ pdu->Buff = dma_alloc_coherent(&ha->pdev->dev, length, &pdu->DmaBuff,
+ GFP_KERNEL);
+ if (pdu->Buff == NULL)
+ return NULL;
+
+ memset(pdu->Buff, 0, length);
+
+ /* Fill in remainder of PDU */
+ pdu->BuffLen = length;
+ pdu->SendBuffLen = 0;
+ pdu->RecvBuffLen = 0;
+ pdu->Next = NULL;
+ ha->free_pdu_top = free_pdu_top;
+ ha->free_pdu_bottom = free_pdu_bottom;
+ ha->pdu_active = pdu_active;
+ return pdu;
+}
+
+void
+qla4xxx_free_pdu(scsi_qla_host_t * ha, PDU_ENTRY * pdu)
+{
+ if (ha->free_pdu_bottom == NULL) {
+ ha->free_pdu_top = pdu;
+ ha->free_pdu_bottom = pdu;
+ } else {
+ ha->free_pdu_bottom->Next = pdu;
+ ha->free_pdu_bottom = pdu;
+ }
+ dma_free_coherent(&ha->pdev->dev, pdu->BuffLen, pdu->Buff,
+ pdu->DmaBuff);
+ ha->pdu_active--;
+
+ /* Clear PDU */
+ pdu->Buff = NULL;
+ pdu->BuffLen = 0;
+ pdu->SendBuffLen = 0;
+ pdu->RecvBuffLen = 0;
+ pdu->Next = NULL;
+ pdu->DmaBuff = 0;
+}
+
+/**************************************************************************
+ * qla4xxx_send_passthru0_iocb
+ * This routine issues a passthru0 IOCB.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ *
+ * Remarks: hardware_lock acquired upon entry, interrupt context
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully sent marker IOCB
+ * QLA_ERROR - Failed to send marker IOCB
+ **************************************************************************/
-ENEEDSKERNELDOC
+int
+qla4xxx_send_passthru0_iocb(scsi_qla_host_t * ha, uint16_t fw_ddb_index,
+ uint16_t connection_id, dma_addr_t pdu_dma_data, uint32_t send_len,
+ uint32_t recv_len, uint16_t control_flags, uint32_t handle)
+{
+ PASSTHRU0_ENTRY *passthru_entry;
+ uint8_t status = QLA_SUCCESS;
+
+ /* Get pointer to the queue entry for the marker */
+ if (qla4xxx_get_req_pkt(ha, (QUEUE_ENTRY **) &passthru_entry) !=
+ QLA_SUCCESS) {
+ status = QLA_ERROR;
+ goto exit_send_pt0;
+ }
+
+ /* Fill in the request queue */
+ passthru_entry->hdr.entryType = ET_PASSTHRU0;
+ passthru_entry->hdr.entryCount = 1;
+ passthru_entry->handle = cpu_to_le32(handle);
+ passthru_entry->target = cpu_to_le16(fw_ddb_index);
+ passthru_entry->connectionID = cpu_to_le16(connection_id);
+ passthru_entry->timeout = __constant_cpu_to_le16(PT_DEFAULT_TIMEOUT);
+ if (send_len) {
+ control_flags |= PT_FLAG_SEND_BUFFER;
+ passthru_entry->outDataSeg64.base.addrHigh =
+ cpu_to_le32(MSDW(pdu_dma_data));
+ passthru_entry->outDataSeg64.base.addrLow =
+ cpu_to_le32(LSDW(pdu_dma_data));
+ passthru_entry->outDataSeg64.count = cpu_to_le32(send_len);
+ }
+ if (recv_len) {
+ passthru_entry->inDataSeg64.base.addrHigh =
+ cpu_to_le32(MSDW(pdu_dma_data));
+ passthru_entry->inDataSeg64.base.addrLow =
+ cpu_to_le32(LSDW(pdu_dma_data));
+ passthru_entry->inDataSeg64.count = cpu_to_le32(recv_len);
+ }
+ passthru_entry->controlFlags = cpu_to_le16(control_flags);
+ wmb();
+
+ /* Tell ISP it's got a new I/O request */
+ WRT_REG_DWORD(&ha->reg->req_q_in, ha->request_in);
+ PCI_POSTING(&ha->reg->req_q_in);
+
+exit_send_pt0:
+ return status;
+}
+
+CONTINUE_ENTRY *
+qla4xxx_alloc_cont_entry(scsi_qla_host_t * ha)
+{
+ CONTINUE_ENTRY *cont_entry;
+
+ cont_entry = (CONTINUE_ENTRY *)ha->request_ptr;
You could collapse this into defn + assign above.
+
+ /* Advance request queue pointer */
+ if (ha->request_in == (REQUEST_QUEUE_DEPTH - 1)) {
+ ha->request_in = 0;
+ ha->request_ptr = ha->request_ring;
+ } else {
+ ha->request_in++;
+ ha->request_ptr++;
+ }
+
+ /* Load packet defaults */
+ cont_entry->hdr.entryType = ET_CONTINUE;
+ cont_entry->hdr.entryCount = 1;
+ cont_entry->hdr.systemDefined = (uint8_t) cpu_to_le16(ha->request_in);
+
+ return cont_entry;
+}
+
+uint16_t
+qla4xxx_calc_request_entries(uint16_t dsds)
+{
+ uint16_t iocbs;
+
+ iocbs = 1;
You could collapse this into defn + assign above.
+ if (dsds > COMMAND_SEG) {
+ iocbs += (dsds - COMMAND_SEG) / CONTINUE_SEG;
+ if ((dsds - COMMAND_SEG) % CONTINUE_SEG)
+ iocbs++;
+ }
+ return iocbs;
+}
+
+void
+qla4xxx_build_scsi_iocbs(srb_t *srb, COMMAND_ENTRY *cmd_entry,
+ uint16_t tot_dsds)
+{
+ scsi_qla_host_t *ha;
+ uint16_t avail_dsds;
+ DATA_SEG_A64 *cur_dsd;
+ struct scsi_cmnd *cmd;
+
+ cmd = srb->cmd;
+ ha = srb->ha;
+
+ if (cmd->request_bufflen == 0 || cmd->sc_data_direction == DMA_NONE) {
+ /* No data being transferred */
+ cmd_entry->ttlByteCnt = __constant_cpu_to_le32(0);
+ return;
+ }
+
+ avail_dsds = COMMAND_SEG;
+ cur_dsd = (DATA_SEG_A64 *) & (cmd_entry->dataseg[0]);
+
+ /* Load data segments */
+ if (cmd->use_sg) {
+ struct scatterlist *cur_seg;
+ struct scatterlist *end_seg;
+
+ cur_seg = (struct scatterlist *)cmd->request_buffer;
+ end_seg = cur_seg + tot_dsds;
+ while (cur_seg < end_seg) {
+ dma_addr_t sle_dma;
+
+ /* Allocate additional continuation packets? */
+ if (avail_dsds == 0) {
+ CONTINUE_ENTRY *cont_entry;
+
+ cont_entry = qla4xxx_alloc_cont_entry(ha);
+ cur_dsd =
+ (DATA_SEG_A64 *) &cont_entry->dataseg[0];
+ avail_dsds = CONTINUE_SEG;
+ }
+
+ sle_dma = sg_dma_address(cur_seg);
+ cur_dsd->base.addrLow = cpu_to_le32(LSDW(sle_dma));
+ cur_dsd->base.addrHigh = cpu_to_le32(MSDW(sle_dma));
+ cur_dsd->count = cpu_to_le32(sg_dma_len(cur_seg));
+ avail_dsds--;
+
+ cur_dsd++;
+ cur_seg++;
+ }
+ } else {
+ cur_dsd->base.addrLow = cpu_to_le32(LSDW(srb->dma_handle));
+ cur_dsd->base.addrHigh = cpu_to_le32(MSDW(srb->dma_handle));
+ cur_dsd->count = cpu_to_le32(cmd->request_bufflen);
+ }
+}
+
+/**************************************************************************
+ * qla4xxx_send_command_to_isp
+ * This routine is called by qla4xxx_queuecommand to build an ISP
+ * command and pass it to the ISP for execution.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * srb - pointer to SCSI Request Block to be sent to ISP
+ *
+ * Output:
+ * None
+ *
+ * Remarks:
+ * None
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully sent command to ISP
+ * QLA_ERROR - Failed to send command to ISP
+ **************************************************************************/
-ENEEDSKERNELDOC
+int
+qla4xxx_send_command_to_isp(scsi_qla_host_t *ha, srb_t * srb)
+{
+ struct scsi_cmnd *cmd = srb->cmd;
+ ddb_entry_t *ddb_entry;
+ COMMAND_ENTRY *cmd_entry;
+ struct scatterlist *sg = NULL;
+
+ uint16_t tot_dsds;
+ uint16_t req_cnt;
+
+ unsigned long flags;
+ uint16_t cnt;
+ uint16_t i;
+ uint32_t index;
+ char tag[2];
+
+ /* Get real lun and adapter */
+ ddb_entry = srb->ddb;
+
+ /* Send marker(s) if needed. */
+ if (ha->marker_needed == 1) {
+ if (qla4xxx_send_marker_iocb(ha, ddb_entry, cmd->device->lun) !=
+ QLA_SUCCESS) {
+ return QLA_ERROR;
+ }
+ ha->marker_needed = 0;
+ }
+ tot_dsds = 0;
+
+ /* Acquire hardware specific lock */
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+
+ /* Check for room in active srb array */
+ index = ha->current_active_index;
+ for (i = 0; i < MAX_SRBS; i++) {
+ index++;
+ if (index == MAX_SRBS)
+ index = 1;
+ if (ha->active_srb_array[index] == 0) {
+ ha->current_active_index = index;
+ break;
+ }
+ }
+ if (i >= MAX_SRBS) {
+ printk(KERN_INFO "scsi%ld: %s: NO more SRB entries used "
+ "iocbs=%d, \n reqs remaining=%d\n", ha->host_no, __func__,
+ ha->iocb_cnt, ha->req_q_count);
+ goto queuing_error;
+ }
+
+ /* Calculate the number of request entries needed. */
+ if (cmd->use_sg) {
+ sg = (struct scatterlist *)cmd->request_buffer;
+ tot_dsds = pci_map_sg(ha->pdev, sg, cmd->use_sg,
+ cmd->sc_data_direction);
+ if (tot_dsds == 0)
+ goto queuing_error;
+ } else if (cmd->request_bufflen) {
+ dma_addr_t req_dma;
+
+ req_dma = pci_map_single(ha->pdev, cmd->request_buffer,
+ cmd->request_bufflen, cmd->sc_data_direction);
+ if (dma_mapping_error(req_dma))
+ goto queuing_error;
+
+ srb->dma_handle = req_dma;
+ tot_dsds = 1;
+ }
+ req_cnt = qla4xxx_calc_request_entries(tot_dsds);
+
+ if (ha->req_q_count < (req_cnt + 2)) {
+ cnt = (uint16_t) le32_to_cpu(ha->shadow_regs->req_q_out);
+ if (ha->request_in < cnt)
+ ha->req_q_count = cnt - ha->request_in;
+ else
+ ha->req_q_count = REQUEST_QUEUE_DEPTH -
+ (ha->request_in - cnt);
+ }
+
+ if (ha->req_q_count < (req_cnt + 2))
+ goto queuing_error;
+
+ /* total iocbs active */
+ if ((ha->iocb_cnt + req_cnt) >= REQUEST_QUEUE_DEPTH)
+ goto queuing_error;
+
+ /* Build command packet */
+ cmd_entry = (COMMAND_ENTRY *) ha->request_ptr;
+ memset(cmd_entry, 0, sizeof(COMMAND_ENTRY));
+ cmd_entry->hdr.entryType = ET_COMMAND;
+ cmd_entry->handle = cpu_to_le32(index);
+ cmd_entry->target = cpu_to_le16(ddb_entry->fw_ddb_index);
+ cmd_entry->connection_id = cpu_to_le16(ddb_entry->connection_id);
+
+ int_to_scsilun(cmd->device->lun, &cmd_entry->lun);
+ cmd_entry->cmdSeqNum = cpu_to_le32(ddb_entry->CmdSn);
+ cmd_entry->ttlByteCnt = cpu_to_le32(cmd->request_bufflen);
+ memcpy(cmd_entry->cdb, cmd->cmnd, cmd->cmd_len);
+ cmd_entry->dataSegCnt = cpu_to_le16(tot_dsds);
+ cmd_entry->hdr.entryCount = req_cnt;
+
+ /* Set data transfer direction control flags
+ * NOTE: Look at data_direction bits iff there is data to be
+ * transferred, as the data direction bit is sometimed filled
+ * in when there is no data to be transferred */
+ cmd_entry->control_flags = CF_NO_DATA;
+ if (cmd->request_bufflen) {
+ if (cmd->sc_data_direction == DMA_TO_DEVICE)
+ cmd_entry->control_flags = CF_WRITE;
+ else if (cmd->sc_data_direction == DMA_FROM_DEVICE)
+ cmd_entry->control_flags = CF_READ;
+ }
+
+ /* Set tagged queueing control flags */
+ cmd_entry->control_flags |= CF_SIMPLE_TAG;
+ if (scsi_populate_tag_msg(cmd, tag)) {
+ switch (tag[0]) {
+ case MSG_HEAD_TAG:
+ cmd_entry->control_flags |= CF_HEAD_TAG;
+ break;
+ case MSG_ORDERED_TAG:
+ cmd_entry->control_flags |= CF_ORDERED_TAG;
+ break;
+ }
+ }
+
+ /* Advance request queue pointer */
+ ha->request_in++;
+ if (ha->request_in == REQUEST_QUEUE_DEPTH) {
+ ha->request_in = 0;
+ ha->request_ptr = ha->request_ring;
+ } else {
+ ha->request_ptr++;
+ }
+
+ qla4xxx_build_scsi_iocbs(srb, cmd_entry, tot_dsds);
+ wmb();
+
+ /*
+ * Check to see if adapter is online before placing request on
+ * request queue. If a reset occurs and a request is in the queue,
+ * the firmware will still attempt to process the request, retrieving
+ * garbage for pointers.
+ */
+ if (!test_bit(AF_ONLINE, &ha->flags)) {
+ DEBUG2(printk("scsi%ld: %s: Adapter OFFLINE! "
+ "Do not issue command.\n",
+ ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+ goto queuing_error;
+ }
+
+ /* put command in active array */
+ ha->active_srb_array[index] = srb;
+ srb->cmd->host_scribble = (unsigned char *)(unsigned long)index;
+
+ /* update counters */
+ srb->state = SRB_ACTIVE_STATE;
+ srb->flags |= SRB_DMA_VALID;
+
+ /* Track IOCB used */
+ ha->iocb_cnt += req_cnt;
+ srb->iocb_cnt = req_cnt;
+ ha->req_q_count -= req_cnt;
+
+ /* Debug print statements */
+ WRT_REG_DWORD(&ha->reg->req_q_in, ha->request_in);
+ PCI_POSTING(&ha->reg->req_q_in);
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+
+ return QLA_SUCCESS;
+
+queuing_error:
+ if (cmd->use_sg && tot_dsds) {
+ sg = (struct scatterlist *) cmd->request_buffer;
+ pci_unmap_sg(ha->pdev, sg, cmd->use_sg, cmd->sc_data_direction);
+ } else if (tot_dsds) {
+ pci_unmap_single(ha->pdev, srb->dma_handle,
+ cmd->request_bufflen, cmd->sc_data_direction);
+ }
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+
+ return QLA_ERROR;
+}
^ permalink raw reply related
* Re: raid5 high cpu usage during reads - oprofile results
From: Alex Izvorski @ 2006-04-01 18:40 UTC (permalink / raw)
To: dean gaudet; +Cc: linux-raid
In-Reply-To: <Pine.LNX.4.64.0603252122210.6166@twinlark.arctic.org>
On Sat, 2006-03-25 at 21:38 -0800, dean gaudet wrote:
> On Sat, 25 Mar 2006, Alex Izvorski wrote:
>
> > http://linuxraid.pastebin.com/621363 - oprofile annotated assembly
>
> it looks to me like a lot of time is spent in __find_stripe() ... i wonder
> if the hash is working properly.
>
> in raid5.c you could try changing
>
> #define stripe_hash(conf, sect) (&((conf)->stripe_hashtbl[((sect) >> STRIPE_SHIFT) & HASH_MASK]))
>
> to
>
> #define stripe_hash(conf, sect) (&((conf)->stripe_hashtbl[(((sect) >> STRIPE_SHIFT) ^ ((sect) >> (2*STRIPE_SHIFT))) & HASH_MASK]))
>
> or maybe try using jhash_1word((sect) >> STRIPE_SHIFT, 0) ...
>
> -dean
Dean - I think I see what you mean, you're looking at this line in the
assembly?
65830 16.8830 : c1f: cmp %rcx,0x28(%rax)
I looked at the hash stuff, I think the problem is not that the hash
function is poor, but rather that the number of entries in all buckets
gets to be pretty high. I haven't actually run this with extra
debugging statements yet, but as far as I can tell from reading the
code, the hash-related defines will get the following values:
NR_HASH = 512
HASH_MASK = 0x1ff
STRIPE_SHIFT = 3
With this, every successive stripe will go to a different bucket, so for
a sequential access this is a good hash function (actually, to break it
you'd need to read 4k every 2M, which is not a common access pattern).
The problem is that there are too few buckets? Since with 16k entries
in the stripe cache and 512 buckets we'd have 32 elements per bucket.
Would redefining HASH_PAGES to 16 or so help? For that matter, is the
code even expected to work with HASH_PAGES > 1? Perhaps someone who is
more familiar with the code can comment on this.
Regards,
--Alex
^ permalink raw reply
* [PATCH] Typo in arch/mips/Makefile breaks build on Cobalt
From: Scott Ashcroft @ 2006-04-01 18:50 UTC (permalink / raw)
To: linux-mips
[-- Attachment #1: Type: text/plain, Size: 222 bytes --]
There appears to be a couple of typos in the clean up
of the Makefile.
The cflags lines for NEVADA and R5432 have
'cc-options' rather than 'cc-option'.
Attached patch fixes it up.
Signed-Off-by: scott.ashcroft@talk21.com
[-- Attachment #2: 3766969591-Makefile.diff --]
[-- Type: text/plain, Size: 808 bytes --]
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 7bb0296..c254f4f 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -114,9 +114,9 @@ cflags-$(CONFIG_CPU_MIPS64_R1) += $(call
cflags-$(CONFIG_CPU_MIPS64_R2) += $(call cc-option,-march=mips64r2,-mips2 -mtune=r4600 ) \
-Wa,-mips64r2 -Wa,--trap
cflags-$(CONFIG_CPU_R5000) += -march=r5000 -Wa,--trap
-cflags-$(CONFIG_CPU_R5432) += $(call cc-options,-march=r5400,-march=r5000) \
+cflags-$(CONFIG_CPU_R5432) += $(call cc-option,-march=r5400,-march=r5000) \
-Wa,--trap
-cflags-$(CONFIG_CPU_NEVADA) += $(call cc-options,-march=rm5200,-march=r5000) \
+cflags-$(CONFIG_CPU_NEVADA) += $(call cc-option,-march=rm5200,-march=r5000) \
-Wa,--trap
cflags-$(CONFIG_CPU_RM7000) += $(call cc-option,-march=rm7000,-march=r5000) \
-Wa,--trap
^ permalink raw reply related
* [lm-sensors] PIIX4 and fix_hstcfg
From: Rudolf Marek @ 2006-04-01 18:34 UTC (permalink / raw)
To: lm-sensors
In-Reply-To: <442E9B64.50909@sh.cvut.cz>
Hello
> Note that I just use this as a crashbox now so if it's more trouble than
> it's worth, I wouldn't mind it being dropped.
Thanks for the lspci. It seems it has no PCI subsystem ID regs??? Because of this much easier would be just drop.
I will drop the param + the warning of course.
Regards
Rudolf
^ permalink raw reply
* Re: Grub-devel Digest, Vol 26, Issue 1
From: Z3tbl4 [] @ 2006-04-01 18:32 UTC (permalink / raw)
To: grub-devel
In-Reply-To: <442eb29a.7d8f0f21.5e62.3520SMTPIN_ADDED@mx.gmail.com>
Christian Laursen, nobody could help you HERE, i tried to get some
help about week with no result. but i still don't loose a hope.
2006/4/1, grub-devel-request@gnu.org <grub-devel-request@gnu.org>:
> Send Grub-devel mailing list submissions to
> grub-devel@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.gnu.org/mailman/listinfo/grub-devel
> or, via email, send a message with subject or body 'help' to
> grub-devel-request@gnu.org
>
> You can reach the person managing the list at
> grub-devel-owner@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Grub-devel digest..."
>
>
> Today's Topics:
>
> 1. Problem building grub 1.93 on FreeBSD (Christian Laursen)
> 2. [patch] fixed menu so you can use it... (Vesa J??skel?inen)
> 3. Re: [patch] fixed menu so you can use it... (Marco Gerards)
> 4. TCP timers and telnet (Marco Gerards)
> 5. Re: TCP timers and telnet (Yoshinori K. Okuji)
> 6. Re: TCP timers and telnet (Marco Gerards)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 31 Mar 2006 19:48:01 +0200
> From: Christian Laursen <xi@borderworlds.dk>
> Subject: Problem building grub 1.93 on FreeBSD
> To: The development of GRUB 2 <grub-devel@gnu.org>
> Message-ID: <86r74i1p66.fsf@borg.borderworlds.dk>
> Content-Type: text/plain; charset=us-ascii
>
> I am attempting to build grub 1.93 on FreeBSD but are experiencing problems
> when trying to tell the configure script where to find the LZO library.
>
> Lzo 2 is installed and located in /usr/local/lib:
>
> -rw-r--r-- 1 root wheel 161066 Mar 31 15:33 /usr/local/lib/liblzo2.a
> -rwxr-xr-x 1 root wheel 798 Mar 31 15:33 /usr/local/lib/liblzo2.la
> lrwxr-xr-x 1 root wheel 12 Mar 31 15:33 /usr/local/lib/liblzo2.so -> liblzo2.so.2
> -rwxr-xr-x 1 root wheel 120428 Mar 31 15:33 /usr/local/lib/liblzo2.so.2
>
> I am defining LDFLAGS and CFLAGS before running ./configure they do not
> seem to be used when trying to detect LZO.
>
> The typescript of the configure run is here:
> http://borderworlds.dk/~xi/grub2/configure.txt
>
> The config.log is here:
> http://borderworlds.dk/~xi/grub2/config.log
>
> As far as I can see, my CFLAGS and LDFLAGS are used in some of the tests
> but not in the last ones when trying to detect LZO. I don't understand
> autoconf enough to figure out how to fix this so any hints would be
> greatly appreciated.
>
> Thanks.
>
> --
> Christian Laursen
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 01 Apr 2006 17:32:42 +0300
> From: Vesa J??skel?inen <chaac@nic.fi>
> Subject: [patch] fixed menu so you can use it...
> To: The development of GRUB 2 <grub-devel@gnu.org>
> Message-ID: <442E8F0A.30803@nic.fi>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
> I made some fixes to menu. Now you can even select a menu entry :).
>
> There were also some odd code in elsewhere so I fixed some issues
> related to those too.
>
> Thanks,
> Vesa Jääskeläinen
> -------------- next part --------------
> Index: ChangeLog
> ===================================================================
> RCS file: /sources/grub/grub2/ChangeLog,v
> retrieving revision 1.228
> diff -u -r1.228 ChangeLog
> --- ChangeLog 31 Mar 2006 14:26:33 -0000 1.228
> +++ ChangeLog 1 Apr 2006 14:28:58 -0000
> @@ -1,3 +1,9 @@
> +2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
> +
> + * normal/main.c (grub_normal_menu_addentry): Fixed menu size
> + calculation.
> + (read_config_file): Made it to close file before returning.
> +
> 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
>
> * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
> Index: normal/main.c
> ===================================================================
> RCS file: /sources/grub/grub2/normal/main.c,v
> retrieving revision 1.14
> diff -u -r1.14 main.c
> --- normal/main.c 17 Jan 2006 09:50:47 -0000 1.14
> +++ normal/main.c 1 Apr 2006 14:28:59 -0000
> @@ -153,6 +153,8 @@
> (*last)->next = 0;
> (*last)->sourcecode = sourcecode;
>
> + current_menu->size++;
> +
> return GRUB_ERR_NONE;
> }
>
> @@ -223,10 +225,8 @@
> grub_script_free (parsed_script);
> }
>
> - return newmenu;
> -
> grub_file_close (file);
> - return 0;
> + return newmenu;
> }
>
> /* This starts the normal mode. */
>
> ------------------------------
>
> Message: 3
> Date: Sat, 01 Apr 2006 16:37:46 +0200
> From: Marco Gerards <mgerards@xs4all.nl>
> Subject: Re: [patch] fixed menu so you can use it...
> To: The development of GRUB 2 <grub-devel@gnu.org>
> Message-ID: <873bgx9xad.fsf@xs4all.nl>
> Content-Type: text/plain; charset=iso-8859-1
>
> Vesa Jääskeläinen <chaac@nic.fi> writes:
>
> Hi Vesa,
>
> > I made some fixes to menu. Now you can even select a menu entry :).
> >
> > There were also some odd code in elsewhere so I fixed some issues
> > related to those too.
>
> This looks fine to me. Please apply it.
>
> Thanks,
> Marco
>
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Sat, 01 Apr 2006 18:15:43 +0200
> From: Marco Gerards <mgerards@xs4all.nl>
> Subject: TCP timers and telnet
> To: The development of GRUB <grub-devel@gnu.org>
> Message-ID: <87y7yp8e6o.fsf@xs4all.nl>
> Content-Type: text/plain; charset=us-ascii
>
> Hi,
>
> Lately I have been reading a bit about Open Firmware and that it has
> TCP support and support to telnet into an Open firmware box:
> http://developer.apple.com/technotes/tn/tn2004.html
>
> So I was thinking, why not add such functionality to GRUB 2? It's
> easy to implement with the networking code I currently have. The only
> thing about it that sucks is that we have to implement multitheading,
> kinda...
>
> My idea is that we use the timer interrupt to regularly schedule time
> for the TCP timers and the incoming telnet connections. It will not
> be very hard to implement, but we have to think about how to do proper
> locking. We will at least need locking in disk access and for the
> loaders. So only in a small part of GRUB.
>
> What do you guys think? I think it is not as hard as it sounds now...
>
> Thanks,
> Marco
>
>
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Sat, 1 Apr 2006 18:25:14 +0200
> From: "Yoshinori K. Okuji" <okuji@enbug.org>
> Subject: Re: TCP timers and telnet
> To: The development of GRUB 2 <grub-devel@gnu.org>
> Message-ID: <200604011825.15250.okuji@enbug.org>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Saturday 01 April 2006 18:15, Marco Gerards wrote:
> > So I was thinking, why not add such functionality to GRUB 2? It's
> > easy to implement with the networking code I currently have. The only
> > thing about it that sucks is that we have to implement multitheading,
> > kinda...
>
> I object to multithreading. It makes our life just harder. I prefer an
> event-driven approach as you suggested before.
>
> Okuji
>
>
>
>
> ------------------------------
>
> Message: 6
> Date: Sat, 01 Apr 2006 18:30:52 +0200
> From: Marco Gerards <mgerards@xs4all.nl>
> Subject: Re: TCP timers and telnet
> To: The development of GRUB 2 <grub-devel@gnu.org>
> Message-ID: <87u09d8dhf.fsf@xs4all.nl>
> Content-Type: text/plain; charset=us-ascii
>
> "Yoshinori K. Okuji" <okuji@enbug.org> writes:
>
> > On Saturday 01 April 2006 18:15, Marco Gerards wrote:
> >> So I was thinking, why not add such functionality to GRUB 2? It's
> >> easy to implement with the networking code I currently have. The only
> >> thing about it that sucks is that we have to implement multitheading,
> >> kinda...
> >
> > I object to multithreading. It makes our life just harder. I prefer an
> > event-driven approach as you suggested before.
>
> My previous suggestion would have worked, if you didn't telnet into
> GRUB. The current discussion is about having multiple different GRUB
> sessions simultaniously. So in that case you will need locking, etc.
>
> --
> Marco
>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>
> End of Grub-devel Digest, Vol 26, Issue 1
> *****************************************
>
^ permalink raw reply
* Re: TCP timers and telnet
From: Hollis Blanchard @ 2006-04-01 18:31 UTC (permalink / raw)
To: The development of GRUB 2
In-Reply-To: <87u09d8dhf.fsf@xs4all.nl>
On Apr 1, 2006, at 10:30 AM, Marco Gerards wrote:
> "Yoshinori K. Okuji" <okuji@enbug.org> writes:
>
>> On Saturday 01 April 2006 18:15, Marco Gerards wrote:
>>> So I was thinking, why not add such functionality to GRUB 2? It's
>>> easy to implement with the networking code I currently have. The
>>> only
>>> thing about it that sucks is that we have to implement multitheading,
>>> kinda...
>>
>> I object to multithreading. It makes our life just harder. I prefer an
>> event-driven approach as you suggested before.
>
> My previous suggestion would have worked, if you didn't telnet into
> GRUB. The current discussion is about having multiple different GRUB
> sessions simultaniously. So in that case you will need locking, etc.
What about allowing only a single telnet connection? Or multiple
connections, but they all show the same session?
-Hollis
^ permalink raw reply
* Yuri Golovach is out of the office.
From: yuri.golovach @ 2006-04-01 18:00 UTC (permalink / raw)
To: linux-mtd
I will be out of the office starting 01.04.2006 and will not return until
17.04.2006.
Please, contact Vladislav Kolb if you have any UDC Platform related
questions or I'll answer them when I'll back.
^ permalink raw reply
* Re: Avoid excessive time spend on concurrent slab shrinking
From: David Chinner @ 2006-04-01 18:30 UTC (permalink / raw)
To: Nathan Scott; +Cc: Andrew Morton, Christoph Lameter, nickpiggin, linux-mm, dgc
In-Reply-To: <20060401155942.E961681@wobbly.melbourne.sgi.com>
On Sat, Apr 01, 2006 at 03:59:42PM +1000, Nathan Scott wrote:
> On Fri, Mar 31, 2006 at 05:25:18PM -0800, Andrew Morton wrote:
> > Christoph Lameter <clameter@sgi.com> wrote:
> > ...
> > It appears that we're being busy in xfs_iextract(), but it would be sad if
> > the problem was really lock contention in xfs_iextract(), and we just
> > happened to catch it when it was running.
> >
> > Or maybe xfs_iextract is just slow. So this is one thing we need to get to
> > the bottom of (profiles might tell us).
>
> I assume (profiles would be good to prove it) we are spending
> time walking the hash bucket list there Christoph (while we're
> holding the ch_lock spinlock on the hash bucket)? [CC'ing Dave
> Chinner for any further comment, he's been looking at the chash
> list for unrelated reasons recently..]
You'll only get contention if something else is trying to walk the
same hash chain, which tends to implicate not enough hash buckets.
> If its useful for experimenting, Christoph, you can easily tweak the
> cluster hash size manually by dinking with xfs_iget.c::xfs_chash_init.
Just use the ihashsize mount option - the cluster hash size is proportional
to the inode hash size which is changed by the ihashsize mount option.
Cheers,
Dave.
--
Dave Chinner
R&D Software Enginner
SGI Australian Software Group
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [CMT 08/16] qla4xxx: driver review ql4_inline.h
From: Doug Maxey @ 2006-04-01 18:29 UTC (permalink / raw)
To: Ravi Anand; +Cc: Linux SCSI Mailing List
Missing some kerneldoc and levels on printks.
++doug
--
diff --git a/drivers/scsi/qla4xxx/ql4_inline.h b/drivers/scsi/qla4xxx/ql4_inline.h
new file mode 100644
index 0000000..bd4dd42
--- /dev/null
+++ b/drivers/scsi/qla4xxx/ql4_inline.h
@@ -0,0 +1,86 @@
+/*
+ * QLogic iSCSI HBA Driver
+ * Copyright (c) 2003-2006 QLogic Corporation
+ *
+ * See LICENSE.qla4xxx for copyright and licensing details.
+ */
+
+/*
+ *
+ * qla4xxx_lookup_ddb_by_fw_index
+ * This routine locates a device handle given the firmware device
+ * database index. If device doesn't exist, returns NULL.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * fw_ddb_index - Firmware's device database index
+ *
+ * Returns:
+ * Pointer to the corresponding internal device database structure
+ */
-ENEEDSKERNELDOC
+static inline ddb_entry_t *
+qla4xxx_lookup_ddb_by_fw_index(scsi_qla_host_t *ha, uint32_t fw_ddb_index)
+{
+ ddb_entry_t *ddb_entry = NULL;
+
+ if ((fw_ddb_index < MAX_DDB_ENTRIES) &&
+ (ha->fw_ddb_index_map[fw_ddb_index] !=
+ (ddb_entry_t *) INVALID_ENTRY)) {
+ ddb_entry = ha->fw_ddb_index_map[fw_ddb_index];
+ }
+
+ DEBUG3(printk("scsi%d: %s: index [%d], ddb_entry = %p\n",
+ ha->host_no, __func__, fw_ddb_index, ddb_entry));
-EPRINTKMISSINGLEVEL
+
+ return ddb_entry;
+}
+
+static inline void
+__qla4xxx_enable_intrs(scsi_qla_host_t *ha)
+{
+ if (IS_QLA4022(ha)) {
+ WRT_REG_DWORD(&ha->reg->u1.isp4022.intr_mask,
+ SET_RMASK(IMR_SCSI_INTR_ENABLE));
+ PCI_POSTING(&ha->reg->u1.isp4022.intr_mask);
+ } else {
+ WRT_REG_DWORD(&ha->reg->ctrl_status,
+ SET_RMASK(CSR_SCSI_INTR_ENABLE));
+ PCI_POSTING(&ha->reg->ctrl_status);
+ }
+ set_bit(AF_INTERRUPTS_ON, &ha->flags);
+}
+
+static inline void
+__qla4xxx_disable_intrs(scsi_qla_host_t *ha)
+{
+ if (IS_QLA4022(ha)) {
+ WRT_REG_DWORD(&ha->reg->u1.isp4022.intr_mask,
+ CLR_RMASK(IMR_SCSI_INTR_ENABLE));
+ PCI_POSTING(&ha->reg->u1.isp4022.intr_mask);
+ } else {
+ WRT_REG_DWORD(&ha->reg->ctrl_status,
+ CLR_RMASK(CSR_SCSI_INTR_ENABLE));
+ PCI_POSTING(&ha->reg->ctrl_status);
+ }
+ clear_bit(AF_INTERRUPTS_ON, &ha->flags);
+}
+
+static inline void
+qla4xxx_enable_intrs(scsi_qla_host_t *ha)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+ __qla4xxx_enable_intrs(ha);
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+}
+
+static inline void
+qla4xxx_disable_intrs(scsi_qla_host_t *ha)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+ __qla4xxx_disable_intrs(ha);
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+}
^ permalink raw reply related
* Re: sata controllers status=0x51 { DriveReady SeekComplete Error } error=0x84 { DriveStatusError BadCRC }
From: Mark Hahn @ 2006-04-01 18:25 UTC (permalink / raw)
To: David Greaves; +Cc: Mitchell Laks, linux-raid
In-Reply-To: <442E698D.8000100@dgreaves.com>
> >Mar 29 23:33:26 A1 kernel: ata6: status=0x51 { DriveReady SeekComplete Error }
> >Mar 29 23:33:26 A1 kernel: ata6: error=0x84 { DriveStatusError BadCRC }
BadCRC is unambiguous: the packet was corrupted. that could happen several
ways, the most common of which is bogus cables (remember, PATA is 18",
not longer, with the ends plugged in.) but things like flakey power,
overclocking, or controllers programmed with wrong timing could also
cause such errors.
^ permalink raw reply
* Re: Avoid excessive time spend on concurrent slab shrinking
From: David Chinner @ 2006-04-01 18:24 UTC (permalink / raw)
To: Christoph Lameter; +Cc: Andrew Morton, nickpiggin, linux-mm
In-Reply-To: <Pine.LNX.4.64.0603311619590.9173@schroedinger.engr.sgi.com>
On Fri, Mar 31, 2006 at 04:22:29PM -0800, Christoph Lameter wrote:
> Some traces:
>
> Stack traceback for pid 16836
> 0xe00000380bc68000 16836 1 1 6 R
> 0xa00000020b8e6050 [xfs]xfs_iextract+0x190
> 0xa00000020b8e63a0 [xfs]xfs_ireclaim+0x80
> 0xa00000020b921c70 [xfs]xfs_finish_reclaim+0x330
> 0xa00000020b921fa0 [xfs]xfs_reclaim+0x140
> 0xa00000020b93f820 [xfs]linvfs_clear_inode+0x260
Christoph, what machine, what XFS mount options? Did the latest upgrade
lose the "ihashsize=xxxxx" mount option that used to be set on all
the large filesystems?
Cheers,
Dave.
--
Dave Chinner
R&D Software Enginner
SGI Australian Software Group
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [CMT 07/16] qla4xxx: driver review ql4_init.c
From: Doug Maxey @ 2006-04-01 18:23 UTC (permalink / raw)
To: Ravi Anand; +Cc: Linux SCSI Mailing List
++doug
--
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
new file mode 100644
index 0000000..b2877f0
--- /dev/null
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -0,0 +1,1540 @@
+/*
+ * QLogic iSCSI HBA Driver
+ * Copyright (c) 2003-2006 QLogic Corporation
+ *
+ * See LICENSE.qla4xxx for copyright and licensing details.
+ */
+
+#include "ql4_def.h"
+
+/*
+* QLogic ISP4xxx Hardware Support Function Prototypes.
+ */
+extern int ql4xdiscoverywait;
Needs to go into a header. mbx.c and os.c also have this decl.
+
+static void
+ql4xxx_set_mac_number(scsi_qla_host_t * ha)
+{
+ uint32_t value;
+ uint8_t func_number;
+ unsigned long flags;
+
+ /* Get the function number */
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+ value = RD_REG_DWORD(&ha->reg->ctrl_status);
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+
+ func_number = (uint8_t) ((value >> 4) & 0x30);
+ switch (value & ISP_CONTROL_FN_MASK) {
+ case ISP_CONTROL_FN0_SCSI:
+ ha->mac_index = 1;
+ break;
+ case ISP_CONTROL_FN1_SCSI:
+ ha->mac_index = 3;
+ break;
+ default:
+ DEBUG2(printk("scsi%ld: %s: Invalid function number, "
+ "ispControlStatus = 0x%x\n", ha->host_no, __func__, value));
-EPRINTKMISSINGLEVEL
-ELINETOOLONG
+ break;
+ }
+ DEBUG2(printk("scsi%ld: %s: mac_index %d.\n", ha->host_no, __func__,
+ ha->mac_index));
-EPRINTKMISSINGLEVEL
+}
+
+/**************************************************************************
+ * qla4xxx_free_ddb
+ * This routine deallocates and unlinks the specified ddb_entry from the
+ * adapter's
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * ddb_entry - Pointer to device database entry
+ *
+ * Returns:
+ * None
+ **************************************************************************/
-ENEEDSKERNELDOC
+void
+qla4xxx_free_ddb(scsi_qla_host_t * ha, struct ddb_entry *ddb_entry)
+{
+ /* Remove device entry from list */
+ list_del_init(&ddb_entry->list);
+
+ /* Remove device pointer from index mapping arrays */
+ ha->fw_ddb_index_map[ddb_entry->fw_ddb_index] =
+ (ddb_entry_t *) INVALID_ENTRY;
+ ha->tot_ddbs--;
+
+ /* Free memory for device entry */
+ kfree(ddb_entry);
+}
+
+/**************************************************************************
+ * qla4xxx_free_ddb_list
+ * This routine deallocates and removes all devices on the sppecified
+ * adapter.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ *
+ * Returns:
+ * None
+ **************************************************************************/
-ENEEDSKERNELDOC
+void
+qla4xxx_free_ddb_list(scsi_qla_host_t * ha)
+{
+ struct list_head *ptr;
+ struct ddb_entry *ddb_entry;
+
+ while (!list_empty(&ha->ddb_list)) {
+ /* Remove device entry from head of list */
+ ptr = ha->ddb_list.next;
+ list_del_init(ptr);
+
+ /* Free memory for device entry */
+ ddb_entry = list_entry(ptr, struct ddb_entry, list);
+ qla4xxx_free_ddb(ha, ddb_entry);
+ }
+}
+
+/*
+ * qla4xxx_init_rings
+ * This routine initializes the internal queues for the specified adapter.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ *
+ * Remarks:
+ * The QLA4010 requires us to restart the queues at index 0.
+ * The QLA4000 doesn't care, so just default to QLA4010's requirement.
+ * Returns:
+ * QLA_SUCCESS - Always return success.
+ */
-ENEEDSKERNELDOC
+int
+qla4xxx_init_rings(scsi_qla_host_t * ha)
+{
+ uint16_t i;
+ unsigned long flags = 0;
+
+ /* Initialize request queue. */
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+ ha->request_out = 0;
+ ha->request_in = 0;
+ ha->request_ptr = &ha->request_ring[ha->request_in];
+ ha->req_q_count = REQUEST_QUEUE_DEPTH;
+
+ /* Initialize response queue. */
+ ha->response_in = 0;
+ ha->response_out = 0;
+ ha->response_ptr = &ha->response_ring[ha->response_out];
+
+ /*
+ * Initialize DMA Shadow registers. The firmware is really supposed to
+ * take care of this, but on some uniprocessor systems, the shadow
+ * registers aren't cleared-- causing the interrupt_handler to think
+ * there are responses to be processed when there aren't.
+ */
+ ha->shadow_regs->req_q_out = __constant_cpu_to_le32(0);
+ ha->shadow_regs->rsp_q_in = __constant_cpu_to_le32(0);
+ wmb();
+
+ WRT_REG_DWORD(&ha->reg->req_q_in, 0);
+ WRT_REG_DWORD(&ha->reg->rsp_q_out, 0);
+ PCI_POSTING(&ha->reg->rsp_q_out);
+
+ /* Initialize active array */
+ for (i = 0; i < MAX_SRBS; i++)
+ ha->active_srb_array[i] = 0;
+
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+
+ return QLA_SUCCESS;
+}
+
+#define qla4xxx_mac_is_equal(mac1, mac2) (memcmp(mac1, mac2, MAC_ADDR_LEN) == 0)
-ENOTUSED
+
+/**************************************************************************
+ * qla4xxx_validate_mac_address
+ * This routine validates the M.A.C. Address(es) of the adapter
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully validated M.A.C. address
+ * QLA_ERROR - Failed to validate M.A.C. address
+ **************************************************************************/
-ENEEDSKERNELDOC
+static int
+qla4xxx_validate_mac_address(scsi_qla_host_t *ha)
+{
+ FLASH_SYS_INFO *sys_info = NULL;
+ dma_addr_t sys_info_dma;
+ int status = QLA_ERROR;
+
+ sys_info = dma_alloc_coherent(&ha->pdev->dev, sizeof(*sys_info),
+ &sys_info_dma, GFP_KERNEL);
+ if (sys_info == NULL) {
+ DEBUG2(printk("scsi%ld: %s: Unable to allocate dma buffer.\n",
+ ha->host_no, __func__));
+
+ goto exit_validate_mac_no_free;
+ }
+ memset(sys_info, 0, sizeof(*sys_info));
+
+ /* Get flash sys info */
+ if (qla4xxx_get_flash(ha, sys_info_dma, FLASH_OFFSET_SYS_INFO,
+ sizeof(*sys_info)) != QLA_SUCCESS) {
+ DEBUG2(printk("scsi%ld: %s: get_flash FLASH_OFFSET_SYS_INFO "
+ "failed\n", ha->host_no, __func__));
+
+ goto exit_validate_mac;
+ }
+
+ /* Save M.A.C. address & serial_number */
+ memcpy(ha->my_mac, &sys_info->physAddr[0].address[0],
+ min(sizeof(ha->my_mac), sizeof(sys_info->physAddr[0].address)));
+ memcpy(ha->serial_number, &sys_info->acSerialNumber,
+ min(sizeof(ha->serial_number), sizeof(sys_info->acSerialNumber)));
+
+ status = QLA_SUCCESS;
+
+exit_validate_mac:
+ dma_free_coherent(&ha->pdev->dev, sizeof(*sys_info), sys_info,
+ sys_info_dma);
+
+exit_validate_mac_no_free:
+ return status;
+}
+
+/*
+ * qla4xxx_init_local_data
+ * This routine initializes the local data for the specified adapter.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully initialized local data
+ * QLA_ERROR - Failed to initialize local data
+ */
-ENEEDSKERNELDOC
+static int
+qla4xxx_init_local_data(scsi_qla_host_t *ha)
+{
+ int i;
+
+ /* Initialize passthru PDU list */
+ for (i = 0; i < (MAX_PDU_ENTRIES - 1); i++)
+ ha->pdu_queue[i].Next = &ha->pdu_queue[i + 1];
+ ha->free_pdu_top = &ha->pdu_queue[0];
+ ha->free_pdu_bottom = &ha->pdu_queue[MAX_PDU_ENTRIES - 1];
+ ha->free_pdu_bottom->Next = NULL;
+ ha->pdu_active = 0;
+
+ /* Initilize aen queue */
+ ha->aen_q_count = MAX_AEN_ENTRIES;
+
+ return qla4xxx_get_firmware_status(ha);
+}
+
+static int
+qla4xxx_fw_ready(scsi_qla_host_t * ha)
+{
+ uint32_t timeout_count;
+ int ready = 0;
+
+ DEBUG2(ql4_printk(KERN_INFO, ha, "Waiting for Firmware Ready..\n"));
+ for (timeout_count = ADAPTER_INIT_TOV; timeout_count > 0;
+ timeout_count--) {
+ if (test_and_clear_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags))
+ qla4xxx_get_dhcp_ip_address(ha);
+
+ /* Get firmware state. */
+ if (qla4xxx_get_firmware_state(ha) != QLA_SUCCESS) {
+ DEBUG2(printk("scsi%ld: %s: unable to get firmware "
+ "state\n", ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+ break;
+
+ }
+
+ if (ha->firmware_state & FW_STATE_ERROR) {
+ DEBUG2(printk("scsi%ld: %s: an unrecoverable error has "
+ "occurred\n", ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+ break;
+
+ }
+ if (ha->firmware_state & FW_STATE_CONFIG_WAIT) {
+ /*
+ * The firmware has not yet been issued an Initialize
+ * Firmware command, so issue it now.
+ */
+ if (qla4xxx_initialize_fw_cb(ha) == QLA_ERROR)
+ break;
+
+ /* Go back and test for ready state - no wait. */
+ continue;
+ }
+
+ if (ha->firmware_state == FW_STATE_READY) {
+ DEBUG2(ql4_printk(KERN_INFO, ha, "Firmware Ready..\n"));
+ /* The firmware is ready to process SCSI commands. */
+ DEBUG2(ql4_printk(KERN_INFO, ha,
+ "scsi%ld: %s: MEDIA TYPE - %s\n", ha->host_no,
+ __func__, (ha->addl_fw_state &
+ FW_ADDSTATE_OPTICAL_MEDIA) != 0 ? "OPTICAL" :
+ "COPPER"));
+ DEBUG2(ql4_printk(KERN_INFO, ha,
+ "scsi%ld: %s: DHCP STATE Enabled " "%s\n",
+ ha->host_no, __func__, (ha->addl_fw_state &
+ FW_ADDSTATE_DHCP_ENABLED) != 0 ? "YES" : "NO"));
+ DEBUG2(ql4_printk(KERN_INFO, ha,
+ "scsi%ld: %s: LINK %s\n", ha->host_no, __func__,
+ (ha->addl_fw_state & FW_ADDSTATE_LINK_UP) != 0 ?
+ "UP" : "DOWN"));
+ DEBUG2(ql4_printk(KERN_INFO, ha,
+ "scsi%ld: %s: iSNS Service " "Started %s\n",
+ ha->host_no, __func__, (ha->addl_fw_state &
+ FW_ADDSTATE_ISNS_SVC_ENABLED) != 0 ? "YES" : "NO"));
+
+ ready = 1;
+ break;
+ }
+ DEBUG2(printk("scsi%ld: %s: waiting on fw, state=%x:%x - "
+ "seconds expired= %d\n", ha->host_no, __func__,
+ ha->firmware_state, ha->addl_fw_state, timeout_count));
-EPRINTKMISSINGLEVEL
+ msleep(1000);
+ } /* end of for */
+
+ if (timeout_count <= 0)
+ DEBUG2(printk("scsi%ld: %s: FW Initialization timed out!\n",
+ ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+
+ if (ha->firmware_state & FW_STATE_DHCP_IN_PROGRESS) {
+ DEBUG2(printk("scsi%ld: %s: FW is reporting its waiting to"
+ " grab an IP address from DHCP server\n",
-EPRINTKMISSINGLEVEL
+ ha->host_no, __func__));
+ ready = 1;
+ }
+
+ return ready;
+}
+
+/*
+ * qla4xxx_init_firmware
+ * This routine initializes the firmware.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully initialized firmware
+ * QLA_ERROR - Failed to initialize firmware
+ */
-ENEEDSKERNELDOC
+static int
+qla4xxx_init_firmware(scsi_qla_host_t * ha)
+{
+ int status = QLA_ERROR;
+
+ ql4_printk(KERN_INFO, ha, "Initializing firmware..\n");
+ if (qla4xxx_initialize_fw_cb(ha) == QLA_ERROR) {
+ DEBUG2(printk("scsi%ld: %s: Failed to initialize firmware "
+ "control block\n", ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+ return status;
+ }
+ if (!qla4xxx_fw_ready(ha))
+ return status;
+
+ set_bit(AF_ONLINE, &ha->flags);
+ return qla4xxx_get_firmware_status(ha);
+}
+
+static struct ddb_entry *
+qla4xxx_get_ddb_entry(scsi_qla_host_t *ha, uint32_t fw_ddb_index)
+{
+ DEV_DB_ENTRY *fw_ddb_entry = NULL;
+ dma_addr_t fw_ddb_entry_dma;
+ struct ddb_entry *ddb_entry = NULL;
+ int found = 0;
+ uint32_t device_state;
+
+ /* Make sure the dma buffer is valid */
+ fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry),
+ &fw_ddb_entry_dma, GFP_KERNEL);
+ if (fw_ddb_entry == NULL) {
+ DEBUG2(printk("scsi%ld: %s: Unable to allocate dma buffer.\n",
+ ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+ return NULL;
+ }
+
+ if (qla4xxx_get_fwddb_entry(ha, fw_ddb_index, fw_ddb_entry,
+ fw_ddb_entry_dma, NULL, NULL, &device_state, NULL, NULL, NULL) ==
+ QLA_ERROR) {
+ DEBUG2(printk("scsi%ld: %s: failed get_ddb_entry for "
+ "fw_ddb_index %d\n", ha->host_no, __func__, fw_ddb_index));
-EPRINTKMISSINGLEVEL
+ return NULL;
+ }
+
+ /* Allocate DDB if not already allocated. */
+ DEBUG2(printk("scsi%ld: %s: Looking for ddb[%d]\n", ha->host_no,
+ __func__, fw_ddb_index));
-EPRINTKMISSINGLEVEL
+ list_for_each_entry(ddb_entry, &ha->ddb_list, list) {
+ if (memcmp(ddb_entry->iscsi_name, fw_ddb_entry->iscsiName,
+ ISCSI_NAME_SIZE) == 0) {
+ found++;
+ break;
+ }
+ }
+
+ if (!found) {
+ DEBUG2(printk("scsi%ld: %s: ddb[%d] not found - allocating "
+ "new ddb\n", ha->host_no, __func__, fw_ddb_index));
-EPRINTKMISSINGLEVEL
+ ddb_entry = qla4xxx_alloc_ddb(ha, fw_ddb_index);
+ }
+
+ /* if not found allocate new ddb */
+ dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), fw_ddb_entry,
+ fw_ddb_entry_dma);
+
+ return ddb_entry;
+}
+
+/**************************************************************************
+ * qla4xxx_update_ddb_entry
+ * This routine updates the driver's internal device database entry
+ * with information retrieved from the firmware's device database
+ * entry for the specified device.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * ddb_entry - Pointer to device database entry
+ *
+ * Output:
+ * ddb_entry - Structure filled in.
+ *
+ * Remarks:
+ * The ddb_entry->fw_ddb_index field must be initialized prior to
+ * calling this routine
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully update ddb_entry
+ * QLA_ERROR - Failed to update ddb_entry
+ **************************************************************************/
-ENEEDSKERNELDOC
+int
+qla4xxx_update_ddb_entry(scsi_qla_host_t * ha, struct ddb_entry *ddb_entry,
+ uint32_t fw_ddb_index)
+{
+ DEV_DB_ENTRY *fw_ddb_entry = NULL;
+ dma_addr_t fw_ddb_entry_dma;
+ int status = QLA_ERROR;
+
+ if (ddb_entry == NULL) {
+ DEBUG2(printk("scsi%ld: %s: ddb_entry is NULL\n", ha->host_no,
+ __func__));
-EPRINTKMISSINGLEVEL
+ goto exit_update_ddb;
+ }
+
+ /* Make sure the dma buffer is valid */
+ fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry),
+ &fw_ddb_entry_dma, GFP_KERNEL);
+ if (fw_ddb_entry == NULL) {
+ DEBUG2(printk("scsi%ld: %s: Unable to allocate dma buffer.\n",
+ ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+
+ goto exit_update_ddb;
+ }
+
+ if (qla4xxx_get_fwddb_entry(ha, fw_ddb_index, fw_ddb_entry,
+ fw_ddb_entry_dma, NULL, NULL, &ddb_entry->fw_ddb_device_state, NULL,
+ &ddb_entry->tcp_source_port_num, &ddb_entry->connection_id) ==
+ QLA_ERROR) {
+ DEBUG2(printk("scsi%ld: %s: failed get_ddb_entry for "
+ "fw_ddb_index %d\n", ha->host_no, __func__, fw_ddb_index));
-EPRINTKMISSINGLEVEL
+
+ goto exit_update_ddb;
+ }
+
+ status = QLA_SUCCESS;
+ ddb_entry->target_session_id = le16_to_cpu(fw_ddb_entry->TSID);
+ ddb_entry->task_mgmt_timeout =
+ le16_to_cpu(fw_ddb_entry->taskMngmntTimeout);
+ ddb_entry->CmdSn = 0;
+ ddb_entry->exe_throttle = le16_to_cpu(fw_ddb_entry->exeThrottle);
+ ddb_entry->default_relogin_timeout =
+ le16_to_cpu(fw_ddb_entry->taskMngmntTimeout);
+ ddb_entry->default_time2wait = le16_to_cpu(fw_ddb_entry->minTime2Wait);
+
+ /* Update index in case it changed */
+ ddb_entry->fw_ddb_index = fw_ddb_index;
+ ha->fw_ddb_index_map[fw_ddb_index] = ddb_entry;
+
+ memcpy(&ddb_entry->iscsi_name[0], &fw_ddb_entry->iscsiName[0],
+ min(sizeof(ddb_entry->iscsi_name),
+ sizeof(fw_ddb_entry->iscsiName)));
+ memcpy(&ddb_entry->ip_addr[0], &fw_ddb_entry->ipAddr[0],
+ min(sizeof(ddb_entry->ip_addr), sizeof(fw_ddb_entry->ipAddr)));
+
+ DEBUG2(printk("scsi%ld: %s: ddb[%d] - State= %x status= %d.\n",
+ ha->host_no, __func__, fw_ddb_index,
+ ddb_entry->fw_ddb_device_state, status);)
-EPRINTKMISSINGLEVEL
+
+exit_update_ddb:
+ if (fw_ddb_entry)
+ dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry),
+ fw_ddb_entry, fw_ddb_entry_dma);
+
+ return status;
+}
+
+/**************************************************************************
+ * qla4xxx_alloc_ddb
+ * This routine allocates a ddb_entry, ititializes some values, and
+ * inserts it into the ddb list.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * fw_ddb_index - Firmware's device database index
+ *
+ * Returns:
+ * Pointer to internal device database structure
+ **************************************************************************/
+struct ddb_entry *
+qla4xxx_alloc_ddb(scsi_qla_host_t * ha, uint32_t fw_ddb_index)
+{
+ struct ddb_entry *ddb_entry;
+
+ DEBUG2(printk("scsi%ld: %s: fw_ddb_index [%d]\n", ha->host_no,
+ __func__, fw_ddb_index));
-EPRINTKMISSINGLEVEL
+
+ ddb_entry = (struct ddb_entry *)kmalloc(sizeof(*ddb_entry), GFP_KERNEL);
+ if (ddb_entry == NULL) {
+ DEBUG2(printk("scsi%ld: %s: Unable to allocate memory "
+ "to add fw_ddb_index [%d]\n", ha->host_no, __func__,
+ fw_ddb_index));
-EPRINTKMISSINGLEVEL
+ return ddb_entry;
+ }
+
+ memset(ddb_entry, 0, sizeof(*ddb_entry));
+ ddb_entry->fw_ddb_index = fw_ddb_index;
+ atomic_set(&ddb_entry->port_down_timer, ha->port_down_retry_count);
+ atomic_set(&ddb_entry->retry_relogin_timer, INVALID_ENTRY);
+ atomic_set(&ddb_entry->relogin_timer, 0);
+ atomic_set(&ddb_entry->relogin_retry_count, 0);
+ atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
+ list_add_tail(&ddb_entry->list, &ha->ddb_list);
+ ha->fw_ddb_index_map[fw_ddb_index] = ddb_entry;
+ ha->tot_ddbs++;
+
+ return ddb_entry;
+}
+
+/**************************************************************************
+ * qla4xxx_configure_ddbs
+ * This routine searches for all valid firmware ddb entries and builds
+ * an internal ddb list.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ *
+ * Remarks:
+ * Ddbs that are considered valid are those with a device state of
+ * SESSION_ACTIVE.
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully built internal ddb list, if targets available
+ * QLA_ERROR - Error on a mailbox command
+ **************************************************************************/
-ENEEDSKERNELDOC
+static int
+qla4xxx_build_ddb_list(scsi_qla_host_t *ha)
+{
+ int status = QLA_SUCCESS;
+ uint32_t fw_ddb_index = 0;
+ uint32_t next_fw_ddb_index = 0;
+ uint32_t ddb_state;
+ uint32_t conn_err, err_code;
+ struct ddb_entry *ddb_entry;
+
+ ql4_printk(KERN_INFO, ha, "Initializing DDBs ...\n");
+ for (fw_ddb_index = 0; fw_ddb_index < MAX_DDB_ENTRIES;
+ fw_ddb_index = next_fw_ddb_index) {
+ /* First, let's see if a device exists here */
+ if (qla4xxx_get_fwddb_entry(ha, fw_ddb_index, NULL, 0, NULL,
+ &next_fw_ddb_index, &ddb_state, &conn_err, NULL, NULL) ==
+ QLA_ERROR) {
+ DEBUG2(printk("scsi%ld: %s: get_ddb_entry, "
+ "fw_ddb_index %d failed", ha->host_no, __func__,
+ fw_ddb_index));
-EPRINTKMISSINGLEVEL
+ return QLA_ERROR;
+ }
+
+ DEBUG2(printk("scsi%ld: %s: Getting DDB[%d] ddbstate=0x%x, "
+ "next_fw_ddb_index=%d.\n", ha->host_no, __func__,
+ fw_ddb_index, ddb_state, next_fw_ddb_index));
-EPRINTKMISSINGLEVEL
+
+ /* Add DDB to internal our ddb list. */
+ ddb_entry = qla4xxx_get_ddb_entry(ha, fw_ddb_index);
+ if (ddb_entry == NULL) {
+ DEBUG2(printk("scsi%ld: %s: Unable to allocate memory "
+ "for device at fw_ddb_index %d\n", ha->host_no,
+ __func__, fw_ddb_index));
-EPRINTKMISSINGLEVEL
+ return QLA_ERROR;
+ }
+ /* Fill in the device structure */
+ if (qla4xxx_update_ddb_entry(ha, ddb_entry, fw_ddb_index) ==
+ QLA_ERROR) {
+ ha->fw_ddb_index_map[fw_ddb_index] =
+ (struct ddb_entry *)INVALID_ENTRY;
+
+ // qla4xxx_free_ddb(ha, ddb_entry);
+ DEBUG2(printk("scsi%ld: %s: update_ddb_entry failed "
+ "for fw_ddb_index %d.\n", ha->host_no, __func__,
-EPRINTKMISSINGLEVEL
+ fw_ddb_index));
+ return QLA_ERROR;
+ }
+
+ /* if fw_ddb with session active state found,
+ * add to ddb_list */
+ DEBUG2(printk("scsi%ld: %s: DDB[%d] added to list\n",
+ ha->host_no, __func__, fw_ddb_index));
-EPRINTKMISSINGLEVEL
+
+ /* Issue relogin, if necessary. */
+ if (ddb_state == DDB_DS_SESSION_FAILED ||
+ ddb_state == DDB_DS_NO_CONNECTION_ACTIVE) {
+
+ atomic_set(&ddb_entry->state, DDB_STATE_DEAD);
+
+ /* Try and login to device */
+ DEBUG2(printk("scsi%ld: %s: Login to DDB[%d]\n",
+ ha->host_no, __func__, fw_ddb_index));
-EPRINTKMISSINGLEVEL
+ err_code = ((conn_err & 0x00ff0000) >> 16);
+ if (err_code == 0x1c || err_code == 0x06) {
+ DEBUG2(printk("scsi%ld: %s send target completed "
+ "or access denied failure\n",
-ELINETOOLONG
-EPRINTKMISSINGLEVEL
+ ha->host_no, __func__));
+ } else {
+ qla4xxx_set_ddb_entry(ha, fw_ddb_index, NULL,
+ 0);
+ }
+ }
+
+ /* We know we've reached the last device when
+ * next_fw_ddb_index is 0 */
+ if (next_fw_ddb_index == 0)
+ break;
+ }
+
+ ql4_printk(KERN_INFO, ha, "DDB list done..\n");
+
+ return status;
+}
+
+/**************************************************************************
+ * qla4xxx_devices_ready
+ * This routine waits up to ql4xdiscoverywait seconds
+ * F/W database during driver load time.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully (re)built internal ddb list
+ * QLA_ERROR - Failed to (re)build internal ddb list
+ **************************************************************************/
-ENEEDSKERNELDOC
+static int
+qla4xxx_devices_ready(scsi_qla_host_t * ha)
+{
+ int halt_wait;
+ unsigned long discovery_wtime;
+ struct ddb_entry *ddb_entry;
+ uint32_t fw_ddb_index;
+ uint32_t next_fw_ddb_index;
+ uint32_t fw_ddb_device_state;
+ uint32_t conn_err;
+ uint32_t err_code;
+
+ discovery_wtime = jiffies + (ql4xdiscoverywait * HZ);
+
+ DEBUG(printk("Waiting (%d) for devices ...\n", ql4xdiscoverywait));
-EPRINTKMISSINGLEVEL
+ do {
+ /* poll for AEN. */
+ qla4xxx_get_firmware_state(ha);
+ if (test_and_clear_bit(DPC_AEN, &ha->dpc_flags)) {
+ /* Set time-between-relogin timer */
+ qla4xxx_process_aen(ha, RELOGIN_DDB_CHANGED_AENS);
+ }
+
+ /* if no relogins active or needed, halt discvery wait */
+ halt_wait = 1;
+
+ /* scan for relogins
+ * ----------------- */
+ for (fw_ddb_index = 0; fw_ddb_index < MAX_DDB_ENTRIES;
+ fw_ddb_index = next_fw_ddb_index) {
+ if (qla4xxx_get_fwddb_entry(ha, fw_ddb_index, NULL, 0,
+ NULL, &next_fw_ddb_index, &fw_ddb_device_state,
+ &conn_err, NULL, NULL) == QLA_ERROR)
+ return QLA_ERROR;
+
+ if (fw_ddb_device_state == DDB_DS_LOGIN_IN_PROCESS)
+ halt_wait = 0;
+
+ if (fw_ddb_device_state == DDB_DS_SESSION_FAILED ||
+ fw_ddb_device_state ==
+ DDB_DS_NO_CONNECTION_ACTIVE) {
+
+ /*
+ * Don't want to do a relogin if connection
+ * error is 0x1c.
+ */
+ err_code = ((conn_err & 0x00ff0000) >> 16);
+ if (err_code == 0x1c || err_code == 0x06) {
+ DEBUG2(printk(
+ "scsi%ld: %s send target completed or "
+ "access denied failure\n",
+ ha->host_no, __func__);)
-ELINETOOLONG
-EPRINTKMISSINGLEVEL
+ } else {
+ /* We either have a device that is in
+ * the process of relogging in or a
+ * device that is waiting to be
+ * relogged in */
+ halt_wait = 0;
+
+ ddb_entry =
+ qla4xxx_lookup_ddb_by_fw_index(ha,
+ fw_ddb_index);
+ if (ddb_entry == NULL)
+ return QLA_ERROR;
+
+ if (ddb_entry->dev_scan_wait_to_start_relogin != 0
-ELINETOOLONG
+ && time_after_eq(jiffies,
+ ddb_entry->dev_scan_wait_to_start_relogin))
-ELINETOOLONG
+ {
+ ddb_entry->
+ dev_scan_wait_to_start_relogin
-ELINETOOLONG
+ = 0;
+ qla4xxx_set_ddb_entry(ha,
+ fw_ddb_index, NULL, 0);
+ }
+ }
+ }
+
+ /* We know we've reached the last device when
+ * next_fw_ddb_index is 0 */
+ if (next_fw_ddb_index == 0)
+ break;
+ }
+
+ if (halt_wait) {
+ DEBUG2(printk("scsi%ld: %s: Delay halted. Devices "
+ "Ready.\n", ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+ return QLA_SUCCESS;
+ }
+
+ msleep(2000);
+ } while (!time_after_eq(jiffies, discovery_wtime));
+
+ DEBUG3(qla4xxx_get_conn_event_log(ha));
+
+ return (QLA_SUCCESS);
+}
+
+static void
+qla4xxx_flush_AENS(scsi_qla_host_t *ha)
+{
+ unsigned long wtime;
+
+ /* Flush the 0x8014 AEN from the firmware as a result of
+ * Auto connect. We are basically doing get_firmware_ddb()
+ * to determine whether we need to log back in or not.
+ * Trying to do a set ddb before we have processed 0x8014
+ * will result in another set_ddb() for the same ddb. In other
+ * words there will be stale entries in the aen_q.
+ */
+ wtime = jiffies + (2 * HZ);
+ do {
+ if (qla4xxx_get_firmware_state(ha) == QLA_SUCCESS)
+ if (ha->firmware_state & (BIT_2 | BIT_0))
+ return;
+
+ if (test_and_clear_bit(DPC_AEN, &ha->dpc_flags))
+ qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS);
+
+ msleep(1000);
+ } while (!time_after_eq(jiffies, wtime));
+
+}
+
+static int
+qla4xxx_initialize_ddb_list(scsi_qla_host_t *ha)
+{
+ uint16_t fw_ddb_index;
+ int status = QLA_SUCCESS;
+
+ /* free the ddb list if is not empty */
+ if (!list_empty(&ha->ddb_list))
+ qla4xxx_free_ddb_list(ha);
+
+ for (fw_ddb_index = 0; fw_ddb_index < MAX_DDB_ENTRIES; fw_ddb_index++)
+ ha->fw_ddb_index_map[fw_ddb_index] =
+ (struct ddb_entry *)INVALID_ENTRY;
+
+ ha->tot_ddbs = 0;
+
+ qla4xxx_flush_AENS(ha);
+
+ /*
+ * First perform device discovery for active
+ * fw ddb indexes and build
+ * ddb list.
+ */
+ if ((status = qla4xxx_build_ddb_list(ha)) == QLA_ERROR)
+ return (status);
+
+ /* Wait for an AEN */
+ qla4xxx_devices_ready(ha);
+
+ /*
+ * Targets can come online after the inital discovery, so processing
+ * the aens here will catch them.
+ */
+ if (test_and_clear_bit(DPC_AEN, &ha->dpc_flags))
+ qla4xxx_process_aen(ha, PROCESS_ALL_AENS);
+
+ return status;
+}
+
+/*
+ * qla4xxx_update_ddb_list
+ * This routine obtains device information from the F/W database after
+ * firmware or adapter resets. The device table is preserved.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully updated internal ddb list
+ * QLA_ERROR - Failed to update internal ddb list
+ */
-ENEEDSKERNELDOC
+int
+qla4xxx_reinitialize_ddb_list(scsi_qla_host_t * ha)
+{
+ int status = QLA_SUCCESS;
+ struct ddb_entry *ddb_entry, *detemp;
+
+ /* Update the device information for all devices. */
+ list_for_each_entry_safe(ddb_entry, detemp, &ha->ddb_list, list) {
+ qla4xxx_update_ddb_entry(ha, ddb_entry,
+ ddb_entry->fw_ddb_index);
+ if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE) {
+ atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
+ DEBUG2(printk ("scsi%ld: %s: ddb index [%d] marked "
+ "ONLINE\n", ha->host_no, __func__,
+ ddb_entry->fw_ddb_index));
+ } else if (atomic_read(&ddb_entry->state) == DDB_STATE_ONLINE)
+ qla4xxx_mark_device_missing(ha, ddb_entry);
+ }
+ return status;
+}
+
+/**************************************************************************
+ * qla4xxx_relogin_device
+ * This routine does a session relogin with the specified device.
+ * The ddb entry must be assigned prior to making this call.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * ddb_entry - Pointer to device database entry
+ *
+ * Returns:
+ * QLA_SUCCESS = Successfully relogged in device
+ * QLA_ERROR = Failed to relogin device
+ **************************************************************************/
-ENEEDSKERNELDOC
+int
+qla4xxx_relogin_device(scsi_qla_host_t * ha, struct ddb_entry * ddb_entry)
+{
+ uint16_t relogin_timer;
+
+ relogin_timer = max(ddb_entry->default_relogin_timeout,
+ (uint16_t)RELOGIN_TOV);
+ atomic_set(&ddb_entry->relogin_timer, relogin_timer);
+
+ DEBUG2(printk("scsi%ld: Relogin index [%d]. TOV=%d\n", ha->host_no,
+ ddb_entry->fw_ddb_index, relogin_timer));
-EPRINTKMISSINGLEVEL
+
+ qla4xxx_set_ddb_entry(ha, ddb_entry->fw_ddb_index, NULL, 0);
+
+ return QLA_SUCCESS;
+}
+
+/**************************************************************************
+ * qla4010_topcat_soft_reset
+ * This routine determines if the QLA4040 TopCat chip is present.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ *
+ * Returns:
+ * None.
+ **************************************************************************/
+static void
+qla4010_get_topcat_presence(scsi_qla_host_t * ha)
+{
+ unsigned long flags;
+ uint16_t topcat;
+
+ QL4XXX_LOCK_NVRAM(ha);
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+ topcat = RD_NVRAM_WORD(ha, offsetof(eeprom_data_t, isp4010.topcat));
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+
+ if ((topcat & TOPCAT_MASK) == TOPCAT_PRESENT)
+ set_bit(AF_TOPCAT_CHIP_PRESENT, &ha->flags);
+ else
+ clear_bit(AF_TOPCAT_CHIP_PRESENT, &ha->flags);
+ QL4XXX_UNLOCK_NVRAM(ha);
+}
+
+
+static int
+qla4xxx_config_nvram(scsi_qla_host_t * ha)
+{
+ unsigned long flags;
+ EXTERNAL_HW_CONFIG_REG extHwConfig;
+
+ DEBUG2(printk("scsi%ld: %s: Get EEProm parameters \n", ha->host_no,
+ __func__));
-EPRINTKMISSINGLEVEL
+ QL4XXX_LOCK_FLASH(ha);
+ QL4XXX_LOCK_NVRAM(ha);
+ /* Get EEPRom Parameters from NVRAM and validate */
+ ql4_printk(KERN_INFO, ha, "Configuring NVRAM ...\n");
+ if (qla4xxx_is_nvram_configuration_valid(ha) == QLA_SUCCESS) {
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+ extHwConfig.Asuint32_t = RD_NVRAM_WORD(ha,
+ EEPROM_EXT_HW_CONF_OFFSET());
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+ } else {
+ /*
+ * QLogic adapters should always have a valid NVRAM.
+ * If not valid, do not load.
+ */
+ ql4_printk(KERN_WARNING, ha,
+ "scsi%ld: %s: EEProm checksum invalid. Please update "
+ "your EEPROM\n", ha->host_no, __func__);
+
+ /* set defaults */
+ if (IS_QLA4010(ha))
+ extHwConfig.Asuint32_t = 0x1912;
+ else if (IS_QLA4022(ha))
+ extHwConfig.Asuint32_t = 0x0023;
+ }
+ DEBUG(printk("scsi%ld: %s: Setting extHwConfig to 0xFFFF%04x\n",
+ ha->host_no, __func__, extHwConfig.Asuint32_t));
-EPRINTKMISSINGLEVEL
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+ WRT_REG_DWORD(ISP_EXT_HW_CONF(ha),
+ ((0xFFFF << 16) | extHwConfig.Asuint32_t));
+ PCI_POSTING(ISP_EXT_HW_CONF(ha));
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+ QL4XXX_UNLOCK_NVRAM(ha);
+ QL4XXX_UNLOCK_FLASH(ha);
+
+ return 1;
+}
+
+static void
+qla4x00_pci_config(scsi_qla_host_t * ha)
+{
+ uint16_t w, mwi;
+
+ ql4_printk(KERN_INFO, ha, "Configuring PCI space...\n");
+
+ pci_set_master(ha->pdev);
+ mwi = 0;
+ if (pci_set_mwi(ha->pdev))
+ mwi = PCI_COMMAND_INVALIDATE;
+ /*
+ * We want to respect framework's setting of PCI configuration space
+ * command register and also want to make sure that all bits of
+ * interest to us are properly set in command register.
+ */
+ pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
+ w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
+ w &= ~PCI_COMMAND_INTX_DISABLE;
+ pci_write_config_word(ha->pdev, PCI_COMMAND, w);
+}
+
+static int
+qla4xxx_start_firmware_from_flash(scsi_qla_host_t * ha)
+{
+ int status = QLA_ERROR;
+ uint32_t max_wait_time;
+ unsigned long flags;
+ uint32_t mbox_status;
+
+ ql4_printk(KERN_INFO, ha, "Starting firmware ...\n");
+
+ /*
+ * Start firmware from flash ROM
+ *
+ * WORKAROUND: Stuff a non-constant value that the firmware can
+ * use as a seed for a random number generator in MB7 prior to
+ * setting BOOT_ENABLE. Fixes problem where the TCP
+ * connections use the same TCP ports after each reboot,
+ * causing some connections to not get re-established.
+ */
+ DEBUG(printk("scsi%d: %s: Start firmware from flash ROM\n",
+ ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+ WRT_REG_DWORD(&ha->reg->mailbox[7], jiffies);
+ if (IS_QLA4022(ha))
+ WRT_REG_DWORD(&ha->reg->u1.isp4022.nvram,
+ SET_RMASK(NVR_WRITE_ENABLE));
+
+ WRT_REG_DWORD(&ha->reg->ctrl_status, SET_RMASK(CSR_BOOT_ENABLE));
+ PCI_POSTING(&ha->reg->ctrl_status);
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+
+ /* Wait for firmware to come UP. */
+ max_wait_time = FIRMWARE_UP_TOV * 4;
+ do {
+ uint32_t ctrl_status;
+
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+ ctrl_status = RD_REG_DWORD(&ha->reg->ctrl_status);
+ mbox_status = RD_REG_DWORD(&ha->reg->mailbox[0]);
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+
+ if (ctrl_status & SET_RMASK(CSR_SCSI_PROCESSOR_INTR))
+ break;
+ if (mbox_status == MBOX_STS_COMMAND_COMPLETE)
+ break;
+
+ DEBUG2(printk("scsi%ld: %s: Waiting for boot firmware to "
+ "complete... ctrl_sts=0x%x, remaining=%d\n", ha->host_no,
+ __func__, ctrl_status, max_wait_time));
-EPRINTKMISSINGLEVEL
+
+ msleep(250);
+ } while ((max_wait_time--));
+
+ if (mbox_status == MBOX_STS_COMMAND_COMPLETE) {
+ DEBUG(printk("scsi%ld: %s: Firmware has started\n",
+ ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+ WRT_REG_DWORD(&ha->reg->ctrl_status,
+ SET_RMASK(CSR_SCSI_PROCESSOR_INTR));
+ PCI_POSTING(&ha->reg->ctrl_status);
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+
+ status = QLA_SUCCESS;
+ } else {
+ printk(KERN_INFO "scsi%ld: %s: Boot firmware failed "
+ "- mbox status 0x%x\n", ha->host_no, __func__,
+ mbox_status);
+ status = QLA_ERROR;
+ }
+ return status;
+}
+
+/**************************************************************************
+ * qla4xxx_start_firmware
+ * This routine performs the neccessary steps to start the firmware for
+ * the QLA4010 adapter.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully started QLA4xxx firmware
+ * QLA_ERROR - Failed to start QLA4xxx firmware
+ **************************************************************************/
-ENEEDSKERNELDOC
+static int
+qla4xxx_start_firmware(scsi_qla_host_t * ha)
+{
+ unsigned long flags = 0;
+ uint32_t mbox_status;
+ int status = QLA_ERROR;
+ int soft_reset = 1;
+ int config_chip = 0;
+
+ if (IS_QLA4010(ha))
+ qla4010_get_topcat_presence(ha);
+
+ if (IS_QLA4022(ha))
+ ql4xxx_set_mac_number(ha);
+
+ QL4XXX_LOCK_DRVR_WAIT(ha);
+
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+
+ DEBUG2(printk("scsi%ld: %s: port_ctrl = 0x%08X\n", ha->host_no,
+ __func__, RD_REG_DWORD(ISP_PORT_CTRL(ha))));
-EPRINTKMISSINGLEVEL
+ DEBUG(printk("scsi%ld: %s: port_status = 0x%08X\n", ha->host_no,
+ __func__, RD_REG_DWORD(ISP_PORT_STATUS(ha))));
-EPRINTKMISSINGLEVEL
+
+ /* Is Hardware already initialized? */
+ if ((RD_REG_DWORD(ISP_PORT_CTRL(ha)) & 0x8000) != 0) {
+ DEBUG(printk("scsi%ld: %s: Hardware has already been "
+ "initialized\n", ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+
+ /* Receive firmware boot acknowledgement */
+ mbox_status = RD_REG_DWORD(&ha->reg->mailbox[0]);
+
+ DEBUG2(printk("scsi%ld: %s: H/W Config complete - mbox[0]= "
+ "0x%x\n", ha->host_no, __func__, mbox_status));
-EPRINTKMISSINGLEVEL
+
+ /* Is firmware already booted? */
+ if (mbox_status == 0) {
+ /* F/W not running, must be config by net driver */
+ config_chip = 1;
+ soft_reset = 0;
+ } else {
+ WRT_REG_DWORD(&ha->reg->ctrl_status,
+ SET_RMASK(CSR_SCSI_PROCESSOR_INTR));
+ PCI_POSTING(&ha->reg->ctrl_status);
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+ if (qla4xxx_get_firmware_state(ha) == QLA_SUCCESS) {
+ DEBUG2(printk("scsi%ld: %s: Get firmware "
+ "state -- state = 0x%x\n", ha->host_no,
+ __func__, ha->firmware_state));
+ /* F/W is running */
+ if (ha->firmware_state & FW_STATE_CONFIG_WAIT) {
-ELINETOOLONG
+ DEBUG2(printk("scsi%ld: %s: Firmware "
+ "in known state -- config and "
+ "boot, state = 0x%x\n",
+ ha->host_no, __func__,
+ ha->firmware_state));
-EPRINTKMISSINGLEVEL
+ config_chip = 1;
+ soft_reset = 0;
+ }
+ } else {
+ DEBUG2(printk("scsi%ld: %s: Firmware in "
+ "unknown state -- resetting, state = "
+ "0x%x\n", ha->host_no, __func__,
+ ha->firmware_state));
-EPRINTKMISSINGLEVEL
+ }
+ spin_lock_irqsave(&ha->hardware_lock, flags);
+ }
+ } else {
+ DEBUG(printk("scsi%ld: %s: H/W initialization hasn't been "
+ "started - resetting\n", ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+ }
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+
+ DEBUG(printk("scsi%ld: %s: Flags soft_rest=%d, config= %d\n ",
+ ha->host_no, __func__, soft_reset, config_chip));
-EPRINTKMISSINGLEVEL
+ if (soft_reset) {
+ DEBUG(printk("scsi%ld: %s: Issue Soft Reset\n", ha->host_no,
+ __func__));
-EPRINTKMISSINGLEVEL
+ status = qla4xxx_soft_reset(ha);
+ if (status == QLA_ERROR) {
+ DEBUG(printk("scsi%d: %s: Soft Reset failed!\n",
+ ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+ QL4XXX_UNLOCK_DRVR(ha);
+ return QLA_ERROR;
+ }
+ config_chip = 1;
+
+ /* Reset clears the semaphore, so aquire again */
+ QL4XXX_LOCK_DRVR_WAIT(ha);
+ }
+
+ if (config_chip) {
+ if (qla4xxx_config_nvram(ha))
+ status = qla4xxx_start_firmware_from_flash(ha);
+ }
+
+ QL4XXX_UNLOCK_DRVR(ha);
+ if (status == QLA_SUCCESS) {
+ qla4xxx_get_fw_version(ha);
+ if (test_and_clear_bit(AF_GET_CRASH_RECORD, &ha->flags))
+ qla4xxx_get_crash_record(ha);
+ } else {
+ DEBUG(printk("scsi%ld: %s: Firmware has NOT started\n",
+ ha->host_no, __func__));
-EPRINTKMISSINGLEVEL
+ }
+ return status;
+}
+
+
+/**************************************************************************
+ * qla4xxx_initialize_adapter
+ * This routine parforms all of the steps necessary to initialize the
+ * adapter.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * renew_ddb_list - Indicates what to do with the adapter's ddb list
+ * after adapter recovery has completed.
+ * 0=preserve ddb list, 1=destroy and rebuild ddb list
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully initialized adapter
+ * QLA_ERROR - Failed to initialize adapter
+ **************************************************************************/
+int
+qla4xxx_initialize_adapter(scsi_qla_host_t * ha, uint8_t renew_ddb_list)
+{
+ int status = QLA_ERROR;
+ int8_t ip_address[IP_ADDR_LEN] = {0} ;
+
+ ha->eeprom_cmd_data = 0;
+
+ qla4x00_pci_config(ha);
+
+ qla4xxx_disable_intrs(ha);
+
+ /* Initialize the Host adapter request/response queues and firmware */
+ if (qla4xxx_start_firmware(ha) == QLA_ERROR)
+ return status;
+
+ if (qla4xxx_validate_mac_address(ha) == QLA_ERROR)
+ return status;
+
+ if (qla4xxx_init_local_data(ha) == QLA_ERROR)
+ return status;
+
+ status = qla4xxx_init_firmware(ha);
+ if (status == QLA_ERROR)
+ return status;
+
+ /*
+ * FW is waiting to get an IP address from DHCP server: Skip building
+ * the ddb_list and wait for DHCP lease acquired aen to come in
+ * followed by 0x8014 aen" to trigger the tgt discovery process.
+ */
+ if (ha->firmware_state & FW_STATE_DHCP_IN_PROGRESS)
+ return status;
+
+ /* Skip device discovery if ip and subnet is zero */
+ if (memcmp(ha->ip_address, ip_address, IP_ADDR_LEN) == 0 ||
+ memcmp(ha->subnet_mask, ip_address, IP_ADDR_LEN) == 0)
+ return status;
+
+ if (renew_ddb_list == PRESERVE_DDB_LIST) {
+ /*
+ * We want to preserve lun states (i.e. suspended, etc.)
+ * for recovery initiated by the driver. So just update
+ * the device states for the existing ddb_list.
+ */
+ qla4xxx_reinitialize_ddb_list(ha);
+ } else if (renew_ddb_list == REBUILD_DDB_LIST) {
+ /*
+ * We want to build the ddb_list from scratch during
+ * driver initialization and recovery initiated by the
+ * INT_HBA_RESET IOCTL.
+ */
+ status = qla4xxx_initialize_ddb_list(ha);
+ if (status == QLA_ERROR) {
+ DEBUG2(printk("%s(%ld) Error occurred during build ddb "
+ "list\n", __func__, ha->host_no));
+ goto exit_init_hba;
+ }
+
+ }
+ if (!ha->tot_ddbs) {
+ DEBUG2(printk("scsi%ld: Failed to initialize devices or none "
+ "present in Firmware device database\n", ha->host_no));
-EPRINTKMISSINGLEVEL
+ }
+
+exit_init_hba:
+ return status;
+
+}
+
+/**************************************************************************
+ * qla4xxx_add_device_dynamically
+ * This routine processes adds a device as a result of an 8014h AEN.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * fw_ddb_index - Firmware's device database index
+ *
+ * Returns:
+ * None
+ **************************************************************************/
-ENEEDSKERNELDOC
+static void
+qla4xxx_add_device_dynamically(scsi_qla_host_t *ha, uint32_t fw_ddb_index)
+{
+ struct ddb_entry * ddb_entry;
+
+ /* First allocate a device structure */
+ ddb_entry = qla4xxx_get_ddb_entry(ha, fw_ddb_index);
+ if (ddb_entry == NULL) {
+ DEBUG2(printk(KERN_WARNING
+ "scsi%ld: Unable to allocate memory to add fw_ddb_index "
+ "%d\n", ha->host_no, fw_ddb_index));
-EPRINTKMISSINGLEVEL
+ } else if (qla4xxx_update_ddb_entry(ha, ddb_entry, fw_ddb_index) ==
+ QLA_ERROR) {
+ ha->fw_ddb_index_map[fw_ddb_index] =
+ (struct ddb_entry *)INVALID_ENTRY;
+ DEBUG2(printk(KERN_WARNING
+ "scsi%ld: failed to add new device at index [%d]\n"
+ "Unable to retrieve fw ddb entry\n", ha->host_no,
+ fw_ddb_index));
-EPRINTKMISSINGLEVEL
+ } else {
+ /* New device. Let's add it to the database */
+ DEBUG2(printk("scsi%ld: %s: new device at index [%d]\n",
+ ha->host_no, __func__, fw_ddb_index));
-EPRINTKMISSINGLEVEL
+/*FIXME*/
+ /*qla4xxx_config_os(ha);*/
+ }
+}
+
+/**************************************************************************
+ * qla4xxx_process_ddb_changed
+ * This routine processes a Decive Database Changed AEN Event.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * fw_ddb_index - Firmware's device database index
+ * state - Device state
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully processed ddb_changed aen
+ * QLA_ERROR - Failed to process ddb_changed aen
+ **************************************************************************/
-ENEEDSKERNELDOC
+int
+qla4xxx_process_ddb_changed(scsi_qla_host_t * ha, uint32_t fw_ddb_index,
+ uint32_t state)
+{
+ struct ddb_entry * ddb_entry;
+ uint32_t old_fw_ddb_device_state;
+
+ /* check for out of range index */
+ if (fw_ddb_index >= MAX_DDB_ENTRIES)
+ return QLA_ERROR;
+
+ /* Get the corresponging ddb entry */
+ ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, fw_ddb_index);
+ /* Device does not currently exist in our database. */
+ if (ddb_entry == NULL) {
+ if (state == DDB_DS_SESSION_ACTIVE)
+ qla4xxx_add_device_dynamically(ha, fw_ddb_index);
+ return QLA_SUCCESS;
+ }
+
+ /* Device already exists in our database. */
+ old_fw_ddb_device_state = ddb_entry->fw_ddb_device_state;
+ DEBUG2(printk("scsi%ld: %s DDB - old state= 0x%x, new state=0x%x for "
+ "index [%d]\n", ha->host_no, __func__,
+ ddb_entry->fw_ddb_device_state, state, fw_ddb_index));
-EPRINTKMISSINGLEVEL
+ if (old_fw_ddb_device_state == state &&
+ state == DDB_DS_SESSION_ACTIVE) {
+ /* Do nothing, state not changed. */
+ return QLA_SUCCESS;
+ }
+
+ ddb_entry->fw_ddb_device_state = state;
+ /* Device is back online. */
+ if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE) {
+ atomic_set(&ddb_entry->port_down_timer,
+ ha->port_down_retry_count);
+ atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
+ atomic_set(&ddb_entry->relogin_retry_count, 0);
+ atomic_set(&ddb_entry->relogin_timer, 0);
+ clear_bit(DF_RELOGIN, &ddb_entry->flags);
+ clear_bit(DF_NO_RELOGIN, &ddb_entry->flags);
+ /*
+ * Change the lun state to READY in case the lun TIMEOUT before
+ * the device came back.
+ */
+ } else {
+ /* Device went away, try to relogin. */
+ /* Mark device missing */
+ if (atomic_read(&ddb_entry->state) == DDB_STATE_ONLINE)
+ qla4xxx_mark_device_missing(ha, ddb_entry);
+ /*
+ * Relogin if device state changed to a not active state.
+ * However, do not relogin if this aen is a result of an IOCTL
+ * logout (DF_NO_RELOGIN) or if this is a discovered device.
+ */
+ if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_FAILED &&
+ !test_bit(DF_RELOGIN, &ddb_entry->flags) &&
+ !test_bit(DF_NO_RELOGIN, &ddb_entry->flags) &&
+ !test_bit(DF_ISNS_DISCOVERED, &ddb_entry->flags)) {
+ /*
+ * This triggers a relogin. After the relogin_timer
+ * expires, the relogin gets scheduled. We must wait a
+ * minimum amount of time since receiving an 0x8014 AEN
+ * with failed device_state or a logout response before
+ * we can issue another relogin.
+ */
+ /* Firmware padds this timeout: (time2wait +1).
+ * Driver retry to login should be longer than F/W.
+ * Otherwise F/W will fail
+ * set_ddb() mbx cmd with 0x4005 since it still
+ * counting down its time2wait.
+ */
+ atomic_set(&ddb_entry->relogin_timer, 0);
+ atomic_set(&ddb_entry->retry_relogin_timer,
+ ddb_entry->default_time2wait + 4);
+ }
+ }
+
+ return QLA_SUCCESS;
+}
+
+/**************************************************************************
+ * qla4xxx_login_device
+ * This routine is called by the login IOCTL to log in the specified
+ * device.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * fw_ddb_index - Index of the device to login
+ * connection_id - Connection ID of the device to login
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully logged in device
+ * QLA_ERROR - Failed to login device
+ **************************************************************************/
-ENEEDSKERNELDOC
+int
+qla4xxx_login_device(scsi_qla_host_t * ha, uint16_t fw_ddb_index,
+ uint16_t connection_id)
+{
+ struct ddb_entry * ddb_entry;
+ int status = QLA_ERROR;
+
+ ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, fw_ddb_index);
+ if (ddb_entry == NULL)
+ goto exit_login_device;
+
+ if (qla4xxx_get_fwddb_entry(ha, fw_ddb_index, NULL, 0, NULL, NULL,
+ &ddb_entry->fw_ddb_device_state, NULL, NULL, NULL) == QLA_ERROR)
+ goto exit_login_device;
+
+ if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE) {
+ status = QLA_SUCCESS;
+ goto exit_login_device;
+ }
+
+ if (qla4xxx_conn_close_sess_logout(ha, fw_ddb_index, connection_id,
+ LOGOUT_OPTION_RELOGIN) != QLA_SUCCESS)
+ goto exit_login_device;
+
+ status = QLA_SUCCESS;
+
+exit_login_device:
+ return status;
+}
+
+/**************************************************************************
+ * qla4xxx_logout_device
+ * This support routine is called by the logout IOCTL to log out
+ * the specified device.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * fw_ddb_index - Index of the device to logout
+ * connection_id - Connection ID of the device to logout
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully logged out device
+ * QLA_ERROR - Failed to logout device
+ **************************************************************************/
-ENEEDSKERNELDOC
+int
+qla4xxx_logout_device(scsi_qla_host_t * ha, uint16_t fw_ddb_index,
+ uint16_t connection_id)
+{
+ int status = QLA_ERROR;
+ struct ddb_entry * ddb_entry;
+ uint32_t old_fw_ddb_device_state;
+
+ ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, fw_ddb_index);
+ if (ddb_entry == NULL)
+ goto exit_logout_device;
+
+ if (qla4xxx_get_fwddb_entry(ha, fw_ddb_index, NULL, 0, NULL, NULL,
+ &old_fw_ddb_device_state, NULL, NULL, NULL) != QLA_SUCCESS)
+ goto exit_logout_device;
+
+ set_bit(DF_NO_RELOGIN, &ddb_entry->flags);
+ if (qla4xxx_conn_close_sess_logout(ha, fw_ddb_index, connection_id,
+ LOGOUT_OPTION_CLOSE_SESSION) != QLA_SUCCESS)
+ goto exit_logout_device;
+
+ status = QLA_SUCCESS;
+
+exit_logout_device:
+ return status;
+}
+
+/*
+ * qla4xxx_delete_device
+ * This routine is called by the logout IOCTL to delete the specified
+ * device. Send the LOGOUT and DELETE_DDB commands for the specified
+ * target, even if it's not in our internal database.
+ *
+ * Input:
+ * ha - Pointer to host adapter structure.
+ * fw_ddb_index - Index of the device to delete
+ * connection_id - Connection ID of the device to delete
+ *
+ * Returns:
+ * QLA_SUCCESS - Successfully deleted device
+ * QLA_ERROR - Failed to delete device
+ */
-ENEEDSKERNELDOC
+int
+qla4xxx_delete_device(scsi_qla_host_t * ha, uint16_t fw_ddb_index,
+ uint16_t connection_id)
+{
+ int status = QLA_ERROR;
+ uint32_t fw_ddb_device_state = 0xFFFF;
+ u_long wait_count;
+ struct ddb_entry * ddb_entry;
+
+ /* If the device is in our internal tables, set the NO_RELOGIN bit. */
+ ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, fw_ddb_index);
+ if (ddb_entry != NULL)
+ set_bit(DF_NO_RELOGIN, &ddb_entry->flags);
+
+ /*
+ * If the device state is already one that we can delete, bypass the
+ * logout command.
+ */
+ qla4xxx_get_fwddb_entry(ha, fw_ddb_index, NULL, 0, NULL, NULL,
+ &fw_ddb_device_state, NULL, NULL, NULL);
+ if (fw_ddb_device_state == DDB_DS_UNASSIGNED ||
+ fw_ddb_device_state == DDB_DS_NO_CONNECTION_ACTIVE ||
+ fw_ddb_device_state == DDB_DS_SESSION_FAILED)
+ goto delete_ddb;
+
+ /* First logout index */
+ if (qla4xxx_conn_close_sess_logout(ha, fw_ddb_index, connection_id,
+ LOGOUT_OPTION_CLOSE_SESSION) != QLA_SUCCESS) {
+ DEBUG2(printk("scsi%ld: %s: LOGOUT_OPTION_CLOSE_SESSION "
+ "failed index [%d]\n", ha->host_no, __func__,
+ fw_ddb_index));
-EPRINTKMISSINGLEVEL
+ goto exit_delete_ddb;
+ }
+
+ /* Wait enough time to complete logout */
+ wait_count = jiffies + LOGOUT_TOV * HZ;
+ while (qla4xxx_get_fwddb_entry(ha, fw_ddb_index, NULL, 0, NULL, NULL,
+ &fw_ddb_device_state, NULL, NULL, NULL) == QLA_SUCCESS) {
+ if (time_after_eq(jiffies, wait_count))
+ goto exit_delete_ddb;
+ if (fw_ddb_device_state == DDB_DS_UNASSIGNED ||
+ fw_ddb_device_state == DDB_DS_NO_CONNECTION_ACTIVE ||
+ fw_ddb_device_state == DDB_DS_SESSION_FAILED)
+ break;
+ udelay(50);
+ }
+
+delete_ddb:
+ /* Now delete index */
+ if (qla4xxx_clear_database_entry(ha, fw_ddb_index) == QLA_SUCCESS) {
+ status = QLA_SUCCESS;
+
+ if (!ddb_entry)
+ goto exit_delete_ddb;
+
+ atomic_set(&ddb_entry->state, DDB_STATE_DEAD);
+ DEBUG(printk("scsi%ld: %s: removing index %d.\n", ha->host_no,
+ __func__, fw_ddb_index));
-EPRINTKMISSINGLEVEL
+ ha->fw_ddb_index_map[fw_ddb_index] =
+ (struct ddb_entry *)INVALID_ENTRY;
+ }
+
+exit_delete_ddb:
+ return status;
+
+}
^ permalink raw reply related
* Re: PROBLEM: make menuconfig fails under 2.6.16
From: Marco Roeland @ 2006-04-01 18:22 UTC (permalink / raw)
To: Blue Fox; +Cc: linux-kernel
In-Reply-To: <BAY110-F25D3E7350EA99B3B40F1C9FFD70@phx.gbl>
On Saturday April 1st 2006 at 20:11 Blue Fox wrote:
> 1.] One line summary of the problem:
> make menuconfig does not work under linux 2.6.16. Build failed.
>
> [2.] Full description of the problem/report:
> Trying to make menuconfig with ncurses on linux 2.6.15.5 fails.
>
> [3.] Keywords (i.e., modules, networking, kernel):
> scripts lxdialog
> [4.] Kernel version (from /proc/version):
> Linux version 2.6.15.5-ybi (root@raven) (gcc version 4.0.2) #1 PREEMPT Sat
> 17:23:44 CET 2006
>
> [5.] Output of Oops.. message (if applicable) with symbolic information
>
> HOSTLD scripts/kconfig/lxdialog/lxdialog
> scripts/kconfig/lxdialog/checklist.o: In function
> `print_item':checklist.c:(.text+0x64): undefined reference to `wmove'
You seem not to have the "curses" library installed. Try installing it
from your distribution. The kbuild system searches for libncursesw.so,
libncurses.so or libcurses.so, in that order. In your case it probably
can't find any (n)curses(w) package.
--
Marco Roeland
^ permalink raw reply
* [lm-sensors] PIIX4 and fix_hstcfg
From: Tom Rini @ 2006-04-01 18:21 UTC (permalink / raw)
To: lm-sensors
In-Reply-To: <442E9B64.50909@sh.cvut.cz>
On Sat, Apr 01, 2006 at 05:25:24PM +0200, Rudolf Marek wrote:
> Tom, please can you supply the lspci -v -v -v of that machine so a quirk can be developed?
Here you go:
# lspci -vvv
00:00.0 Host bridge: Intel Corporation 440LX/EX - 82443LX/EX Host bridge (rev 03)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 64
Region 0: Memory at e0000000 (32-bit, prefetchable) [size%6M]
Capabilities: [a0] AGP version 1.0
Status: RQ1 SBA+ 64bit- FW- Rate=x1,x2
Command: RQ=0 SBA- AGP- 64bit- FW- Rate=<none>
00:01.0 PCI bridge: Intel Corporation 440LX/EX - 82443LX/EX AGP bridge (rev 03) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Bus: primary\0, secondary\x01, subordinate\x01, sec-latencyd
I/O behind bridge: 0000d000-0000dfff
Memory behind bridge: fd600000-fe6fffff
Prefetchable memory behind bridge: db400000-dd4fffff
BridgeCtl: Parity+ SERR+ NoISA- VGA+ MAbort- >Reset- FastB2B-
00:07.0 ISA bridge: Intel Corporation 82371AB PIIX4 ISA (rev 01)
Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
00:07.1 IDE interface: Intel Corporation 82371AB PIIX4 IDE (rev 01) (prog-if 80 [Master])
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Region 4: I/O ports at ffa0 [disabled] [size\x16]
00:07.2 USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 01) (prog-if 00 [UHCI])
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Interrupt: pin D routed to IRQ 9
Region 4: I/O ports at ef80 [size2]
00:07.3 Bridge: Intel Corporation 82371AB PIIX4 ACPI (rev 01)
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin ? routed to IRQ 9
00:0b.0 Ethernet controller: Intel Corporation 82557 [Ethernet Pro 100] (rev 08)
Subsystem: Intel Corporation EtherExpress PRO/100+ Management Adapter
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (2000ns min, 14000ns max), cache line size 08
Interrupt: pin A routed to IRQ 11
Region 0: Memory at febfd000 (32-bit, non-prefetchable) [size=4K]
Region 1: I/O ports at ef00 [sized]
Region 2: Memory at fea00000 (32-bit, non-prefetchable) [size=1M]
Expansion ROM at fe900000 [disabled] [size=1M]
Capabilities: [dc] Power Management version 2
Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable+ DSel=0 DScale=2 PME-
00:0c.0 Multimedia audio controller: Ensoniq ES1370 [AudioPCI]
Subsystem: Unknown device 4942:4c4c
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (3000ns min, 32000ns max)
Interrupt: pin A routed to IRQ 15
Region 0: I/O ports at ee80 [sized]
00:0d.0 SCSI storage controller: Symbios Logic Inc. (formerly NCR) 53c895 (rev 01)
Subsystem: Tekram Technology Co.,Ltd.: Unknown device 3907
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (7500ns min, 16000ns max), cache line size 08
Interrupt: pin A routed to IRQ 10
Region 0: I/O ports at ec00 [size%6]
Region 1: Memory at febfff00 (32-bit, non-prefetchable) [size%6]
Region 2: Memory at febfe000 (32-bit, non-prefetchable) [size=4K]
Expansion ROM at febe0000 [disabled] [sizedK]
00:0f.0 Unknown mass storage controller: Promise Technology, Inc. 20262 (rev 01)
Subsystem: Promise Technology, Inc.: Unknown device 4d33
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Interrupt: pin A routed to IRQ 10
Region 0: I/O ports at eff0 [size=8]
Region 1: I/O ports at efe4 [size=4]
Region 2: I/O ports at efa8 [size=8]
Region 3: I/O ports at efe0 [size=4]
Region 4: I/O ports at ed80 [sized]
Region 5: Memory at febc0000 (32-bit, non-prefetchable) [size\x128K]
Expansion ROM at febb0000 [disabled] [sizedK]
01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G200 AGP (rev 01) (prog-if 00 [VGA])
Subsystem: Matrox Graphics, Inc. Millennium G200 AGP
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (4000ns min, 8000ns max), cache line size 08
Interrupt: pin A routed to IRQ 11
Region 0: Memory at dc000000 (32-bit, prefetchable) [size\x16M]
Region 1: Memory at fe6fc000 (32-bit, non-prefetchable) [size\x16K]
Region 2: Memory at fd800000 (32-bit, non-prefetchable) [size=8M]
Expansion ROM at fe6e0000 [disabled] [sizedK]
Capabilities: [dc] Power Management version 1
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [f0] AGP version 1.0
Status: RQ1 SBA+ 64bit- FW- Rate=x1,x2
Command: RQ=0 SBA- AGP- 64bit- FW- Rate=<none>
> If you dont have the machine anymore I think we can drop that option anyway because I googled hard and it seemed nobody else had
> similar problems.
Note that I just use this as a crashbox now so if it's more trouble than
it's worth, I wouldn't mind it being dropped.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
* [Bluez-users] snd-bt-sco doesnt load automaticly
From: Niv @ 2006-04-01 18:13 UTC (permalink / raw)
To: bluez-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hay all,
I am running Gentoo kernel 2.6.15.4
my /etc/modules.d/alsa reads:
# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-via82xx
alias snd-card-1 snd-bt87x
alias snd-card-2 snd-bt-sco
alias snd-card-3 snd-usb-audio
alias snd-card-4 snd-usb-audio
It used to load the sco BT , but now doesnt.
When I run modprobe snd-bt-sco , it does load.
Niv
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFELsK2kwazfG0MmCYRAicGAJ9Oma8queMwY8EsxgAbeKcospx0SgCfdK2N
eT8pareSD6rI8ZraemG1o2E=
=DiF0
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply
* Re: addendum: was Re: recovering data on a failed raid-0 installation
From: Mark Hahn @ 2006-04-01 18:11 UTC (permalink / raw)
To: Technomage; +Cc: linux-raid
In-Reply-To: <200603311458.54083.technomage-hawke@cox.net>
> well? are you guys tapped out on this or should I be looking elsewhere?
> The *was* the recommended place to seek out help.
> still waiting........
netiquette hint: if you don't get a reply, you need to first verify
that you provided all possible diagnostic info in a clear, succinct message,
and _send_it_again_. this sort of "well, why haven't you fixed my problem
yet" message is going to discourage any response, since you're asserting
that readers should spend the time to go back, find your message, and do
free work for you.
in short, make yourself easy to help.
regards, mark hahn.
^ permalink raw reply
* PROBLEM: make menuconfig fails under 2.6.16
From: Blue Fox @ 2006-04-01 18:11 UTC (permalink / raw)
To: linux-kernel
1.] One line summary of the problem:
make menuconfig does not work under linux 2.6.16. Build failed.
[2.] Full description of the problem/report:
Trying to make menuconfig with ncurses on linux 2.6.15.5 fails.
[3.] Keywords (i.e., modules, networking, kernel):
scripts lxdialog
[4.] Kernel version (from /proc/version):
Linux version 2.6.15.5-ybi (root@raven) (gcc version 4.0.2) #1 PREEMPT Sat
17:23:44 CET 2006
[5.] Output of Oops.. message (if applicable) with symbolic information
HOSTLD scripts/kconfig/lxdialog/lxdialog
scripts/kconfig/lxdialog/checklist.o: In function
`print_item':checklist.c:(.text+0x64): undefined reference to `wmove'
:checklist.c:(.text+0x88): undefined reference to `wmove'
:checklist.c:(.text+0xc0): undefined reference to `wprintw'
:checklist.c:(.text+0xe4): undefined reference to `wmove'
:checklist.c:(.text+0xf8): undefined reference to `waddch'
:checklist.c:(.text+0x118): undefined reference to `waddnstr'
:checklist.c:(.text+0x130): undefined reference to `wmove'
:checklist.c:(.text+0x138): undefined reference to `wrefresh'
:checklist.c:(.text+0x1a4): undefined reference to `waddch'
scripts/kconfig/lxdialog/checklist.o: In function
`print_arrows':checklist.c:(.text+0x1fa): undefined reference to `acs_map'
:checklist.c:(.text+0x21a): undefined reference to `acs_map'
:checklist.c:(.text+0x220): undefined reference to `wmove'
:checklist.c:(.text+0x240): undefined reference to `waddch'
:checklist.c:(.text+0x254): undefined reference to `waddnstr'
:checklist.c:(.text+0x268): undefined reference to `wmove'
:checklist.c:(.text+0x27a): undefined reference to `acs_map'
:checklist.c:(.text+0x29c): undefined reference to `waddch'
:checklist.c:(.text+0x2a8): undefined reference to `waddch'
:checklist.c:(.text+0x2b4): undefined reference to `waddch'
:checklist.c:(.text+0x2c0): undefined reference to `waddch'
:checklist.c:(.text+0x308): undefined reference to `waddch'
:checklist.c:(.text+0x31c): undefined reference to `waddnstr'
:checklist.c:(.text+0x364): undefined reference to `waddch'
:checklist.c:(.text+0x370): undefined reference to `waddch'
:checklist.c:(.text+0x37c): undefined reference to `waddch'
:checklist.c:(.text+0x388): undefined reference to `waddch'
scripts/kconfig/lxdialog/checklist.o: In function
`print_buttons':checklist.c:(.text+0x41c): undefined reference to `wmove'
resolved (see Documentation/oops-tracing.txt)
[6.] A small shell script or example program which triggers the
problem (if possible)
[7.] Environment
[7.1.] Software (add the output of the ver_linux script here)
Here is the output of sh scripts/ver_linux:
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
Linux raven 2.6.15.5-ybi #1 PREEMPT Sat Mar 4 17:23:44 CET 2006 ppc
GNU/Linux
Gnu C 4.0.2
Gnu make 3.80
binutils 2.16.91.0.5
util-linux 2.12r
mount 2.12r
module-init-tools 3.2.2
e2fsprogs 1.38
reiserfsprogs line
reiser4progs line
Linux C Library 2.3.6
Dynamic linker (ldd) 2.3.6
Linux C++ Library 6.0.6
Procps 3.2.6
Net-tools 1.60
Kbd 1.12
Sh-utils 5.94
udev 086
Modules Loaded
[7.2.] Processor information (from /proc/cpuinfo):
processor : 0
cpu : 604ev
clock : 374MHz
revision : 1.0 (pvr 000a 0100)
bogomips : 373.76
machine : CHRP IBM,7043-150
[7.3.] Module information (from /proc/modules):
[7.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem)
00000000-00bfffff : /pci@80000000
00000000-0000001f : dma1
00000020-00000021 : 8259 (master)
00000040-0000005f : timer
00000060-0000006f : i8042
00000080-0000008f : dma page reg
000000a0-000000a1 : 8259 (slave)
000000c0-000000df : dma2
00000213-00000213 : ISAPnP
000002f8-000002ff : serial
000003c0-000003df : matrox
000003f8-000003ff : serial
000004d0-000004d1 : 8259 edge control
00000a79-00000a79 : isapnp write
00bfcc00-00bfcc03 : 0000:00:0b.1
00bfd000-00bfd003 : 0000:00:0b.1
00bfd400-00bfd407 : 0000:00:0b.1
00bfd800-00bfd807 : 0000:00:0b.1
00bfdc00-00bfdc0f : 0000:00:0b.1
00bfe000-00bfe00f : 0000:00:0b.1
00bfe400-00bfe41f : 0000:00:0c.0
00bfe400-00bfe41f : pcnet32_probe_pci
00bfe800-00bfe8ff : 0000:00:10.0
00bfe800-00bfe8ff : sym53c8xx
00bfec00-00bfecff : 0000:00:12.0
00bff000-00bfffff : PCI Bus #01
00bff800-00bff8ff : 0000:01:01.0
00bffc00-00bffcff : 0000:01:03.0
cat /proc/iomem
80000000-fcffffff : /pci@80000000
f8cf7000-f8cf701f : 0000:00:0c.0
f8cf8000-f8cf80ff : 0000:00:10.0
f8cf8000-f8cf80ff : sym53c8xx
f8cf9000-f8cf90ff : 0000:00:12.0
f8cfa000-f8cfa7ff : 0000:00:12.0
f8cfb000-f8cfbfff : 0000:00:10.0
f8cfb000-f8cfbfff : sym53c8xx
f8d00000-f8dfffff : PCI Bus #01
f8df2000-f8df20ff : 0000:01:01.0
f8df3000-f8df37ff : 0000:01:01.0
f8dfb000-f8dfb0ff : 0000:01:03.0
f8ec0000-f8efffff : 0000:00:0d.0
f9000000-f9003fff : 0000:00:16.0
f9000000-f9003fff : matroxfb MMIO
f9800000-f9ffffff : 0000:00:16.0
fa000000-faffffff : 0000:00:16.0
fa000000-faffffff : matroxfb FB
fd000000-fdffffff : /pci@80000000
[7.5.] PCI information ('lspci -vvv' as root)
[7.6.] SCSI information (from /proc/scsi/scsi)
cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: IBM Model: DGHS09U Rev: 03B0
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 03 Lun: 00
Vendor: IBM Model: CDRM00203 !K Rev: 1_02
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 04 Lun: 00
Vendor: IBM Model: DDRS-34560W Rev: S98G
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 05 Lun: 00
Vendor: HITACHI Model: HUS103073FL3600 Rev: SA1B
Type: Direct-Access ANSI SCSI revision: 03
[7.7.] Other information that might be relevant to the problem
(please look in /proc and include all information that you
think to be relevant):
[X.] Other notes, patches, fixes, workarounds:
^ permalink raw reply
* Re: [PATCH] move ->eh_strategy_handler to the transport class
From: Jeff Garzik @ 2006-04-01 18:10 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: jejb, linux-scsi, linux-ide@vger.kernel.org
In-Reply-To: <20060401172104.GA16921@lst.de>
Christoph Hellwig wrote:
> Overriding the whole EH code is a per-transport, not per-host thing.
> Move ->eh_strategy_handler to the transport class, same as
> ->eh_timed_out.
>
> Downside is that scsi_host_alloc can't check for the total lack of EH
> anymore, but the transition period from old EH where we needed it is
> long gone already.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Looks OK to me. I agree the transport the better place for
eh_strategy_handler.
I would prefer to merge it through the libata-dev queue, since -- as a
glance through the recent kernel changelog shows -- Tejun Heo has been
ripping through this part of libata as well.
Jeff
^ permalink raw reply
* Re: grub 1.93
From: Vesa Jääskeläinen @ 2006-04-01 18:03 UTC (permalink / raw)
To: The development of GRUB 2
In-Reply-To: <87psk189nn.fsf@xs4all.nl>
Marco Gerards wrote:
> Vesa Jääskeläinen <chaac@nic.fi> writes:
>> Sergey Ya. Korshunoff wrote:
>>> 4) default 1
>>> This command do not select right menu item as in 1.92 (always 0)
>> It seems to be broken. But I leave this to Marco when he have time to
>> work on improving the menu code. (Btw. context setting is broken...
>> there is only one pop in code)
>
> Context setting?
default and timeout use grub_context_get_current_menu () to get active
menu. But nothing sets this context.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.