* [GIT PATCH] PCI bugfixes for 2.6.12-rc3 @ 2005-05-04 7:01 Greg KH 2005-05-04 7:02 ` [PATCH] PCI: 'is_enabled' flag should be set/cleared when the device is actually enabled/disabled Greg KH 0 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2005-05-04 7:01 UTC (permalink / raw) To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, linux-pci Here are a number of PCI bugfixes for 2.6.12-rc3. They include a long-standing 64bit sysfs pci bug (has been fixed in the SuSE kernels for months) and some PCI hotplug bugfixes (hopefully the drivers are all now working again...) Almost all of these patches have been in the past few -mm releases. Pull from: rsync://rsync.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6.git/ Full patches will be sent to the linux-kernel and linux-pci mailing lists, if anyone wants to see them. thanks, greg k-h Documentation/pci.txt | 1 Documentation/power/pci.txt | 35 -------------- arch/arm/mach-ixp4xx/common-pci.c | 10 ---- drivers/pci/hotplug/ibmphp.h | 2 drivers/pci/hotplug/ibmphp_hpc.c | 6 +- drivers/pci/hotplug/ibmphp_pci.c | 7 ++ drivers/pci/hotplug/pci_hotplug.h | 2 drivers/pci/hotplug/pciehp_core.c | 23 +++++++-- drivers/pci/hotplug/pcihp_skeleton.c | 2 drivers/pci/msi.c | 6 +- drivers/pci/pci-acpi.c | 2 drivers/pci/pci-driver.c | 11 ++++ drivers/pci/pci-sysfs.c | 82 ++++++++++++++++++++++++----------- drivers/pci/pci.c | 20 +------- drivers/pci/probe.c | 1 drivers/pci/proc.c | 1 drivers/pci/quirks.c | 2 include/linux/pci.h | 3 - 18 files changed, 113 insertions(+), 103 deletions(-) <ssant:in.ibm.com>: o PCI: fix up word-aligned 16-bit PCI config access through sysfs This patch adds the possibility to do word-aligned 16-bit atomic PCI configuration space accesses via the sysfs PCI interface. As a result, problems with Emulex LFPC on IBM PowerPC64 are fixed. Adrian Bunk: o PCI: drivers/pci/pci.c: remove pci_dac_set_dma_mask pci_dac_set_dma_mask is currently completely unused. Dely Sy: o PCI Hotplug: fix pciehp regression I fogot to remove the code that freed the memory in cleanup_slots(). Greg Kroah-Hartman: o PCI: Add pci shutdown ability Now pci drivers can know when the system is going down without having to add a reboot notifier event. o PCI: Clean up a lot of sparse "Should it be static?" warnings Matthew Wilcox: o PCI: update PCI documentation for pci_get_slot() depreciation pci_find_slot() doesn't work on multiple-domain boxes so pci_get_slot() should be used instead. Pavel Machek: o PCI: fix stale PCI pm docs This fixes u32 vs. pm_message_t confusion in documentation, and removes references to no-longer-existing (*save_state), too. With exception of USB (I hope David will fix/apply my patch), this should fix last piece of this confusion... famous last words. Rolf Eike Beer: o PCI Hotplug ibmphp_pci.c: Fix masking out needed information too early here is the patch that fixes the bug introduced by my previous patch which already went into 2.6.12-rc2 and is likely to cause trouble is someone hits Rudolf Marek: o PCI: Rapid Hance quirk This patch just adds Intel's Hance Rapid south bridge IDs to ICH4 region quirk. Steven Cole: o PCI: Spelling fixes for drivers/pci ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] PCI: 'is_enabled' flag should be set/cleared when the device is actually enabled/disabled 2005-05-04 7:01 [GIT PATCH] PCI bugfixes for 2.6.12-rc3 Greg KH @ 2005-05-04 7:02 ` Greg KH 2005-05-04 7:02 ` [PATCH] PCI: fix stale PCI pm docs Greg KH 0 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2005-05-04 7:02 UTC (permalink / raw) To: linux-kernel, linux-pci; +Cc: kaneshige.kenji [PATCH] PCI: 'is_enabled' flag should be set/cleared when the device is actually enabled/disabled I think 'is_enabled' flag in pci_dev structure should be set/cleared when the device actually enabled/disabled. Especially about pci_enable_device(), it can be failed. By this change, we will also get the possibility of refering 'is_enabled' flag from the functions called through pci_enable_device()/pci_disable_device(). Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- commit ceb43744cd48a20212e2179e0c7ff2f450a3c97e tree f9554643bc9d70fe761840a603adce393c0e9f08 parent 8800cea62025a5209d110c5fa5990429239d6eee author Kenji Kaneshige <kaneshige.kenji@soft.fujitsu.com> 1112939611 +0900 committer Greg KH <gregkh@suse.de> 1115189113 -0700 Index: drivers/pci/pci.c =================================================================== --- 2aa9e4732d7014dcda4c0e80d2e377f52e2262e9/drivers/pci/pci.c (mode:100644 sha1:bfbff83352688dc99776706033e1bb80b8282946) +++ f9554643bc9d70fe761840a603adce393c0e9f08/drivers/pci/pci.c (mode:100644 sha1:fc8cc6c53778b6336e26ef23b1ac3e78eb16c7a2) @@ -398,10 +398,10 @@ { int err; - dev->is_enabled = 1; if ((err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1))) return err; pci_fixup_device(pci_fixup_enable, dev); + dev->is_enabled = 1; return 0; } @@ -427,16 +427,15 @@ { u16 pci_command; - dev->is_enabled = 0; - dev->is_busmaster = 0; - pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } + dev->is_busmaster = 0; pcibios_disable_device(dev); + dev->is_enabled = 0; } /** ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] PCI: fix stale PCI pm docs 2005-05-04 7:02 ` [PATCH] PCI: 'is_enabled' flag should be set/cleared when the device is actually enabled/disabled Greg KH @ 2005-05-04 7:02 ` Greg KH 2005-05-04 7:02 ` [PATCH] PCI: update PCI documentation for pci_get_slot() depreciation Greg KH 0 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2005-05-04 7:02 UTC (permalink / raw) To: linux-kernel, linux-pci; +Cc: pavel [PATCH] PCI: fix stale PCI pm docs This fixes u32 vs. pm_message_t confusion in documentation, and removes references to no-longer-existing (*save_state), too. With exception of USB (I hope David will fix/apply my patch), this should fix last piece of this confusion... famous last words. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- commit 92df516e6264f9caff4be49718926d6884fa50ed tree 1b09131f91db847c9f3d6de98ed5cc1ebd0e9325 parent a3ea7fbac12fdb2d70c90bb36f81afa3c66e18f4 author Pavel Machek <pavel@ucw.cz> 1112737789 +0200 committer Greg KH <gregkh@suse.de> 1115189114 -0700 Index: Documentation/power/pci.txt =================================================================== --- be9655df6ea3a0cf2c53a0eb8ff8870962d46871/Documentation/power/pci.txt (mode:100644 sha1:c85428e7ad9263487bf2ef6816e2bdd1379e2097) +++ 1b09131f91db847c9f3d6de98ed5cc1ebd0e9325/Documentation/power/pci.txt (mode:100644 sha1:35b1a7dae34253751ade84ca7f0eda948fac11dd) @@ -165,40 +165,9 @@ These functions are intended for use by individual drivers, and are defined in struct pci_driver: - int (*save_state) (struct pci_dev *dev, u32 state); - int (*suspend) (struct pci_dev *dev, u32 state); + int (*suspend) (struct pci_dev *dev, pm_message_t state); int (*resume) (struct pci_dev *dev); - int (*enable_wake) (struct pci_dev *dev, u32 state, int enable); - - -save_state ----------- - -Usage: - -if (dev->driver && dev->driver->save_state) - dev->driver->save_state(dev,state); - -The driver should use this callback to save device state. It should take into -account the current state of the device and the requested state in order to -avoid any unnecessary operations. - -For example, a video card that supports all 4 states (D0-D3), all controller -context is preserved when entering D1, but the screen is placed into a low power -state (blanked). - -The driver can also interpret this function as a notification that it may be -entering a sleep state in the near future. If it knows that the device cannot -enter the requested state, either because of lack of support for it, or because -the device is middle of some critical operation, then it should fail. - -This function should not be used to set any state in the device or the driver -because the device may not actually enter the sleep state (e.g. another driver -later causes causes a global state transition to fail). - -Note that in intermediate low power states, a device's I/O and memory spaces may -be disabled and may not be available in subsequent transitions to lower power -states. + int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); suspend ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] PCI: update PCI documentation for pci_get_slot() depreciation 2005-05-04 7:02 ` [PATCH] PCI: fix stale PCI pm docs Greg KH @ 2005-05-04 7:02 ` Greg KH 2005-05-04 7:02 ` [PATCH] PCI: Clean up a lot of sparse "Should it be static?" warnings Greg KH 0 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2005-05-04 7:02 UTC (permalink / raw) To: linux-kernel, linux-pci; +Cc: matthew [PATCH] PCI: update PCI documentation for pci_get_slot() depreciation pci_find_slot() doesn't work on multiple-domain boxes so pci_get_slot() should be used instead. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- commit a3ea7fbac12fdb2d70c90bb36f81afa3c66e18f4 tree be9655df6ea3a0cf2c53a0eb8ff8870962d46871 parent ceb43744cd48a20212e2179e0c7ff2f450a3c97e author Matthew Wilcox <matthew@wil.cx> 1112119728 +0100 committer Greg KH <gregkh@suse.de> 1115189114 -0700 Index: Documentation/pci.txt =================================================================== --- f9554643bc9d70fe761840a603adce393c0e9f08/Documentation/pci.txt (mode:100644 sha1:67514bf87ccde2db27f138fc52348899bf8ec351) +++ be9655df6ea3a0cf2c53a0eb8ff8870962d46871/Documentation/pci.txt (mode:100644 sha1:62b1dc5d97e2e90523e8010b93054f81ef3ffe58) @@ -279,6 +279,7 @@ pci_for_each_bus() Superseded by pci_find_next_bus() pci_find_device() Superseded by pci_get_device() pci_find_subsys() Superseded by pci_get_subsys() +pci_find_slot() Superseded by pci_get_slot() pcibios_find_class() Superseded by pci_get_class() pci_find_class() Superseded by pci_get_class() pci_(read|write)_*_nodev() Superseded by pci_bus_(read|write)_*() ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] PCI: Clean up a lot of sparse "Should it be static?" warnings. 2005-05-04 7:02 ` [PATCH] PCI: update PCI documentation for pci_get_slot() depreciation Greg KH @ 2005-05-04 7:02 ` Greg KH 2005-05-04 7:02 ` [PATCH] PCI Hotplug ibmphp_pci.c: Fix masking out needed information too early Greg KH 0 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2005-05-04 7:02 UTC (permalink / raw) To: linux-kernel, linux-pci; +Cc: gregkh [PATCH] PCI: Clean up a lot of sparse "Should it be static?" warnings. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- commit bc56b9e01190b9f1ad6b7c5c694b61bfe34c7aa5 tree 9979aed502d987538c51d9820be9c288462f9996 parent 92df516e6264f9caff4be49718926d6884fa50ed author Greg KH <gregkh@suse.de> 1112939611 +0900 committer Greg KH <gregkh@suse.de> 1115189114 -0700 Index: drivers/pci/pci-acpi.c =================================================================== --- 1b09131f91db847c9f3d6de98ed5cc1ebd0e9325/drivers/pci/pci-acpi.c (mode:100644 sha1:968eb32f292d7e075bb982359d9d7332a5f93f15) +++ 9979aed502d987538c51d9820be9c288462f9996/drivers/pci/pci-acpi.c (mode:100644 sha1:bc01d34e2634ca12b582e8b42c8dab7aee01da79) @@ -19,7 +19,7 @@ static u32 ctrlset_buf[3] = {0, 0, 0}; static u32 global_ctrlsets = 0; -u8 OSC_UUID[16] = {0x5B, 0x4D, 0xDB, 0x33, 0xF7, 0x1F, 0x1C, 0x40, 0x96, 0x57, 0x74, 0x41, 0xC0, 0x3D, 0xD7, 0x66}; +static u8 OSC_UUID[16] = {0x5B, 0x4D, 0xDB, 0x33, 0xF7, 0x1F, 0x1C, 0x40, 0x96, 0x57, 0x74, 0x41, 0xC0, 0x3D, 0xD7, 0x66}; static acpi_status acpi_query_osc ( Index: drivers/pci/pci.c =================================================================== --- 1b09131f91db847c9f3d6de98ed5cc1ebd0e9325/drivers/pci/pci.c (mode:100644 sha1:fc8cc6c53778b6336e26ef23b1ac3e78eb16c7a2) +++ 9979aed502d987538c51d9820be9c288462f9996/drivers/pci/pci.c (mode:100644 sha1:88cbe5b5b3f3f60fbee7915ba3339d2f2f4dc5cf) @@ -16,6 +16,7 @@ #include <linux/module.h> #include <linux/spinlock.h> #include <asm/dma.h> /* isa_dma_bridge_buggy */ +#include "pci.h" /** Index: drivers/pci/probe.c =================================================================== --- 1b09131f91db847c9f3d6de98ed5cc1ebd0e9325/drivers/pci/probe.c (mode:100644 sha1:6f0edadd132cfeee9f8327a4af8d178b7ad16353) +++ 9979aed502d987538c51d9820be9c288462f9996/drivers/pci/probe.c (mode:100644 sha1:b7ae87823c69777f772717947b6911ffdeac6b2b) @@ -9,6 +9,7 @@ #include <linux/slab.h> #include <linux/module.h> #include <linux/cpumask.h> +#include "pci.h" #define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */ #define CARDBUS_RESERVE_BUSNR 3 Index: drivers/pci/proc.c =================================================================== --- 1b09131f91db847c9f3d6de98ed5cc1ebd0e9325/drivers/pci/proc.c (mode:100644 sha1:84cc4f620d8d4807db5830d4aa37f376bfa74463) +++ 9979aed502d987538c51d9820be9c288462f9996/drivers/pci/proc.c (mode:100644 sha1:e68bbfb1e7c318d0c34c11e3c76774ae17f3c60a) @@ -15,6 +15,7 @@ #include <asm/uaccess.h> #include <asm/byteorder.h> +#include "pci.h" static int proc_initialized; /* = 0 */ Index: drivers/pci/quirks.c =================================================================== --- 1b09131f91db847c9f3d6de98ed5cc1ebd0e9325/drivers/pci/quirks.c (mode:100644 sha1:15a398051682ae19334a358600ecee9b85f1a434) +++ 9979aed502d987538c51d9820be9c288462f9996/drivers/pci/quirks.c (mode:100644 sha1:00388a14a3c61693ac734dee4c4cef172b2a0acc) @@ -18,6 +18,7 @@ #include <linux/pci.h> #include <linux/init.h> #include <linux/delay.h> +#include "pci.h" /* Deal with broken BIOS'es that neglect to enable passive release, which can cause problems in combination with the 82441FX/PPro MTRRs */ ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] PCI Hotplug ibmphp_pci.c: Fix masking out needed information too early 2005-05-04 7:02 ` [PATCH] PCI: Clean up a lot of sparse "Should it be static?" warnings Greg KH @ 2005-05-04 7:02 ` Greg KH 2005-05-04 7:02 ` [PATCH] PCI: fix up word-aligned 16-bit PCI config access through sysfs Greg KH 0 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2005-05-04 7:02 UTC (permalink / raw) To: linux-kernel, linux-pci; +Cc: eike-hotplug [PATCH] PCI Hotplug ibmphp_pci.c: Fix masking out needed information too early here is the patch that fixes the bug introduced by my previous patch which already went into 2.6.12-rc2 and is likely to cause trouble is someone hits one the else case here by accident. Using the &= operation before the if statement destroys the information the if asks for so we always go into the else branch. Signed-off-by: Rolf Eike Beer <eike-hotplug@sf-tec.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- commit 034ecc724cc6ba662d0b2b5a1e11e7e66a768596 tree d34ced60da68e2dca2aae90e2b29d8f94618ffbc parent c8958177224622411b9979eabb5610e30b06034b author Rolf Eike Beer <eike-hotplug@sf-tec.de> 1113224514 +0200 committer Greg KH <gregkh@suse.de> 1115189115 -0700 Index: drivers/pci/hotplug/ibmphp_pci.c =================================================================== --- 09ceb4ce69813c9ac2a3e3c7ea6eff9d5361fe9c/drivers/pci/hotplug/ibmphp_pci.c (mode:100644 sha1:2335fac65fb4eee0456837e97d9cd99e5adec341) +++ d34ced60da68e2dca2aae90e2b29d8f94618ffbc/drivers/pci/hotplug/ibmphp_pci.c (mode:100644 sha1:8122fe734aa78d40cd23ea6bd236dcbb040a0bcb) @@ -1308,10 +1308,10 @@ /* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */ } else { /* This is Memory */ - start_address &= PCI_BASE_ADDRESS_MEM_MASK; if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) { /* pfmem */ debug ("start address of pfmem is %x\n", start_address); + start_address &= PCI_BASE_ADDRESS_MEM_MASK; if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) { err ("cannot find corresponding PFMEM resource to remove\n"); @@ -1325,6 +1325,8 @@ } else { /* regular memory */ debug ("start address of mem is %x\n", start_address); + start_address &= PCI_BASE_ADDRESS_MEM_MASK; + if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) { err ("cannot find corresponding MEM resource to remove\n"); return -EIO; @@ -1422,9 +1424,9 @@ /* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */ } else { /* This is Memory */ - start_address &= PCI_BASE_ADDRESS_MEM_MASK; if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) { /* pfmem */ + start_address &= PCI_BASE_ADDRESS_MEM_MASK; if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) { err ("cannot find corresponding PFMEM resource to remove\n"); return -EINVAL; @@ -1436,6 +1438,7 @@ } } else { /* regular memory */ + start_address &= PCI_BASE_ADDRESS_MEM_MASK; if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) { err ("cannot find corresponding MEM resource to remove\n"); return -EINVAL; ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] PCI: fix up word-aligned 16-bit PCI config access through sysfs 2005-05-04 7:02 ` [PATCH] PCI Hotplug ibmphp_pci.c: Fix masking out needed information too early Greg KH @ 2005-05-04 7:02 ` Greg KH 2005-05-04 7:02 ` [PATCH] PCI: Add pci shutdown ability Greg KH 0 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2005-05-04 7:02 UTC (permalink / raw) To: linux-kernel, linux-pci; +Cc: ssant [PATCH] PCI: fix up word-aligned 16-bit PCI config access through sysfs This patch adds the possibility to do word-aligned 16-bit atomic PCI configuration space accesses via the sysfs PCI interface. As a result, problems with Emulex LFPC on IBM PowerPC64 are fixed. Patch is present in SLES 9 SP1. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- commit 4c0619add8c3a8b28e7fae8b15cc7b62de2f8148 tree 2e27d1c516480dd6f3686c05caac09b196475951 parent bc56b9e01190b9f1ad6b7c5c694b61bfe34c7aa5 author ssant@in.ibm.com <ssant@in.ibm.com> 1112939611 +0900 committer Greg KH <gregkh@suse.de> 1115189115 -0700 Index: drivers/pci/pci-sysfs.c =================================================================== --- 9979aed502d987538c51d9820be9c288462f9996/drivers/pci/pci-sysfs.c (mode:100644 sha1:d57ae71d32b1dd42a77689498e691263d263c3e4) +++ 2e27d1c516480dd6f3686c05caac09b196475951/drivers/pci/pci-sysfs.c (mode:100644 sha1:8568b207f18927f4d4cc23006ff2edf07dc932be) @@ -91,6 +91,7 @@ struct pci_dev *dev = to_pci_dev(container_of(kobj,struct device,kobj)); unsigned int size = 64; loff_t init_off = off; + u8 *data = (u8*) buf; /* Several chips lock up trying to read undefined config space */ if (capable(CAP_SYS_ADMIN)) { @@ -108,30 +109,47 @@ size = count; } - while (off & 3) { - unsigned char val; + if ((off & 1) && size) { + u8 val; pci_read_config_byte(dev, off, &val); - buf[off - init_off] = val; + data[off - init_off] = val; off++; - if (--size == 0) - break; + size--; + } + + if ((off & 3) && size > 2) { + u16 val; + pci_read_config_word(dev, off, &val); + data[off - init_off] = val & 0xff; + data[off - init_off + 1] = (val >> 8) & 0xff; + off += 2; + size -= 2; } while (size > 3) { - unsigned int val; + u32 val; pci_read_config_dword(dev, off, &val); - buf[off - init_off] = val & 0xff; - buf[off - init_off + 1] = (val >> 8) & 0xff; - buf[off - init_off + 2] = (val >> 16) & 0xff; - buf[off - init_off + 3] = (val >> 24) & 0xff; + data[off - init_off] = val & 0xff; + data[off - init_off + 1] = (val >> 8) & 0xff; + data[off - init_off + 2] = (val >> 16) & 0xff; + data[off - init_off + 3] = (val >> 24) & 0xff; off += 4; size -= 4; } - while (size > 0) { - unsigned char val; + if (size >= 2) { + u16 val; + pci_read_config_word(dev, off, &val); + data[off - init_off] = val & 0xff; + data[off - init_off + 1] = (val >> 8) & 0xff; + off += 2; + size -= 2; + } + + if (size > 0) { + u8 val; pci_read_config_byte(dev, off, &val); - buf[off - init_off] = val; + data[off - init_off] = val; off++; --size; } @@ -145,6 +163,7 @@ struct pci_dev *dev = to_pci_dev(container_of(kobj,struct device,kobj)); unsigned int size = count; loff_t init_off = off; + u8 *data = (u8*) buf; if (off > dev->cfg_size) return 0; @@ -152,26 +171,41 @@ size = dev->cfg_size - off; count = size; } - - while (off & 3) { - pci_write_config_byte(dev, off, buf[off - init_off]); + + if ((off & 1) && size) { + pci_write_config_byte(dev, off, data[off - init_off]); off++; - if (--size == 0) - break; + size--; } + + if ((off & 3) && size > 2) { + u16 val = data[off - init_off]; + val |= (u16) data[off - init_off + 1] << 8; + pci_write_config_word(dev, off, val); + off += 2; + size -= 2; + } while (size > 3) { - unsigned int val = buf[off - init_off]; - val |= (unsigned int) buf[off - init_off + 1] << 8; - val |= (unsigned int) buf[off - init_off + 2] << 16; - val |= (unsigned int) buf[off - init_off + 3] << 24; + u32 val = data[off - init_off]; + val |= (u32) data[off - init_off + 1] << 8; + val |= (u32) data[off - init_off + 2] << 16; + val |= (u32) data[off - init_off + 3] << 24; pci_write_config_dword(dev, off, val); off += 4; size -= 4; } + + if (size >= 2) { + u16 val = data[off - init_off]; + val |= (u16) data[off - init_off + 1] << 8; + pci_write_config_word(dev, off, val); + off += 2; + size -= 2; + } - while (size > 0) { - pci_write_config_byte(dev, off, buf[off - init_off]); + if (size) { + pci_write_config_byte(dev, off, data[off - init_off]); off++; --size; } ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] PCI: Add pci shutdown ability 2005-05-04 7:02 ` [PATCH] PCI: fix up word-aligned 16-bit PCI config access through sysfs Greg KH @ 2005-05-04 7:02 ` Greg KH 2005-05-04 7:02 ` [PATCH] PCI: Rapid Hance quirk Greg KH 0 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2005-05-04 7:02 UTC (permalink / raw) To: linux-kernel, linux-pci; +Cc: gregkh [PATCH] PCI: Add pci shutdown ability Now pci drivers can know when the system is going down without having to add a reboot notifier event. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- commit c8958177224622411b9979eabb5610e30b06034b tree 09ceb4ce69813c9ac2a3e3c7ea6eff9d5361fe9c parent 4c0619add8c3a8b28e7fae8b15cc7b62de2f8148 author Greg KH <gregkh@suse.de> 1112939611 +0900 committer Greg KH <gregkh@suse.de> 1115189115 -0700 Index: drivers/pci/pci-driver.c =================================================================== --- 2e27d1c516480dd6f3686c05caac09b196475951/drivers/pci/pci-driver.c (mode:100644 sha1:37b7961efc44a93fff15ee41c125be1e71c5d9e5) +++ 09ceb4ce69813c9ac2a3e3c7ea6eff9d5361fe9c/drivers/pci/pci-driver.c (mode:100644 sha1:b42466ccbb309f4961b7a653aa079c3577d7cbb7) @@ -318,6 +318,14 @@ return 0; } +static void pci_device_shutdown(struct device *dev) +{ + struct pci_dev *pci_dev = to_pci_dev(dev); + struct pci_driver *drv = pci_dev->driver; + + if (drv && drv->shutdown) + drv->shutdown(pci_dev); +} #define kobj_to_pci_driver(obj) container_of(obj, struct device_driver, kobj) #define attr_to_driver_attribute(obj) container_of(obj, struct driver_attribute, attr) @@ -385,6 +393,7 @@ drv->driver.bus = &pci_bus_type; drv->driver.probe = pci_device_probe; drv->driver.remove = pci_device_remove; + drv->driver.shutdown = pci_device_shutdown, drv->driver.owner = drv->owner; drv->driver.kobj.ktype = &pci_driver_kobj_type; pci_init_dynids(&drv->dynids); Index: include/linux/pci.h =================================================================== --- 2e27d1c516480dd6f3686c05caac09b196475951/include/linux/pci.h (mode:100644 sha1:3c89148ae28a6e28d4ec21e680a6e383fb885e3d) +++ 09ceb4ce69813c9ac2a3e3c7ea6eff9d5361fe9c/include/linux/pci.h (mode:100644 sha1:cff5ba3ac8ce816c8261dd588be17f488de89507) @@ -671,6 +671,7 @@ int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */ int (*resume) (struct pci_dev *dev); /* Device woken up */ int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */ + void (*shutdown) (struct pci_dev *dev); struct device_driver driver; struct pci_dynids dynids; ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] PCI: Rapid Hance quirk 2005-05-04 7:02 ` [PATCH] PCI: Add pci shutdown ability Greg KH @ 2005-05-04 7:02 ` Greg KH 2005-05-04 7:02 ` [PATCH] PCI Hotplug: fix pciehp regression Greg KH 0 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2005-05-04 7:02 UTC (permalink / raw) To: linux-kernel, linux-pci; +Cc: R.Marek [PATCH] PCI: Rapid Hance quirk This patch just adds Intel's Hance Rapid south bridge IDs to ICH4 region quirk. Patch was successfuly tested by Chunhao Huang from Winbond. Signed-Off-By: Rudolf Marek <r.marek@sh.cvut.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- commit 3aa8c4febf74b1f23bd9fc329321af6d531fe4dd tree 7e0b5b3d9a0308224fb40e452d93ec842a3377fe parent 034ecc724cc6ba662d0b2b5a1e11e7e66a768596 author R.Marek@sh.cvut.cz <R.Marek@sh.cvut.cz> 1114080546 +0000 committer Greg KH <gregkh@suse.de> 1115189116 -0700 Index: drivers/pci/quirks.c =================================================================== --- d34ced60da68e2dca2aae90e2b29d8f94618ffbc/drivers/pci/quirks.c (mode:100644 sha1:00388a14a3c61693ac734dee4c4cef172b2a0acc) +++ 7e0b5b3d9a0308224fb40e452d93ec842a3377fe/drivers/pci/quirks.c (mode:100644 sha1:026aa04669a29467559af822be1ad69d06f61ef0) @@ -329,6 +329,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, quirk_ich4_lpc_acpi ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, quirk_ich4_lpc_acpi ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, quirk_ich4_lpc_acpi ); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1, quirk_ich4_lpc_acpi ); /* * VIA ACPI: One IO region pointed to by longword at ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] PCI Hotplug: fix pciehp regression 2005-05-04 7:02 ` [PATCH] PCI: Rapid Hance quirk Greg KH @ 2005-05-04 7:02 ` Greg KH 2005-05-04 7:02 ` [PATCH] PCI: Spelling fixes for drivers/pci Greg KH 0 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2005-05-04 7:02 UTC (permalink / raw) To: linux-kernel, linux-pci; +Cc: dlsy [PATCH] PCI Hotplug: fix pciehp regression I fogot to remove the code that freed the memory in cleanup_slots(). Here is the new patch, which I have also taken care of the comment by Eike to remove the cast in hotplug_slot->private. Signed-off-by: Dely Sy <dely.l.sy@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- commit b308240b49ff5a1bddc6e10513c2c83f37a0bc78 tree 7fda5a4f25632d19ae03589bee0d920efe8026c3 parent eaae4b3a84a3781543a32bcaf0a33306ae915574 author Dely Sy <dlsy@snoqualmie.dp.intel.com> 1114736933 -0700 committer Greg KH <gregkh@suse.de> 1115189116 -0700 Index: drivers/pci/hotplug/pciehp_core.c =================================================================== --- 2d3db5e9713dd0baeba0be2577731233780f072f/drivers/pci/hotplug/pciehp_core.c (mode:100644 sha1:72baf749e65ef812d8e7f6ed69fba0b44cfc7d58) +++ 7fda5a4f25632d19ae03589bee0d920efe8026c3/drivers/pci/hotplug/pciehp_core.c (mode:100644 sha1:ed1fd8d6178d7f7418d840f93db0ef6e04142c67) @@ -90,6 +90,22 @@ .get_cur_bus_speed = get_cur_bus_speed, }; +/** + * release_slot - free up the memory used by a slot + * @hotplug_slot: slot to free + */ +static void release_slot(struct hotplug_slot *hotplug_slot) +{ + struct slot *slot = hotplug_slot->private; + + dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); + + kfree(slot->hotplug_slot->info); + kfree(slot->hotplug_slot->name); + kfree(slot->hotplug_slot); + kfree(slot); +} + static int init_slots(struct controller *ctrl) { struct slot *new_slot; @@ -139,7 +155,8 @@ /* register this slot with the hotplug pci core */ new_slot->hotplug_slot->private = new_slot; - make_slot_name (new_slot->hotplug_slot->name, SLOT_NAME_SIZE, new_slot); + new_slot->hotplug_slot->release = &release_slot; + make_slot_name(new_slot->hotplug_slot->name, SLOT_NAME_SIZE, new_slot); new_slot->hotplug_slot->ops = &pciehp_hotplug_slot_ops; new_slot->hpc_ops->get_power_status(new_slot, &(new_slot->hotplug_slot->info->power_status)); @@ -188,10 +205,6 @@ while (old_slot) { next_slot = old_slot->next; pci_hp_deregister (old_slot->hotplug_slot); - kfree(old_slot->hotplug_slot->info); - kfree(old_slot->hotplug_slot->name); - kfree(old_slot->hotplug_slot); - kfree(old_slot); old_slot = next_slot; } ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] PCI: Spelling fixes for drivers/pci. 2005-05-04 7:02 ` [PATCH] PCI Hotplug: fix pciehp regression Greg KH @ 2005-05-04 7:02 ` Greg KH 2005-05-04 7:02 ` [PATCH] PCI: drivers/pci/pci.c: remove pci_dac_set_dma_mask Greg KH 0 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2005-05-04 7:02 UTC (permalink / raw) To: linux-kernel, linux-pci; +Cc: elenstev [PATCH] PCI: Spelling fixes for drivers/pci. Here are some spelling corrections for drivers/pci. CONTROLER -> CONTROLLER Regisetr -> Register harware -> hardware inital -> initial Initilize -> Initialize funtion -> function funciton -> function occured -> occurred Signed-off-by: Steven Cole <elenstev@mesatop.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- commit eaae4b3a84a3781543a32bcaf0a33306ae915574 tree 2d3db5e9713dd0baeba0be2577731233780f072f parent 3aa8c4febf74b1f23bd9fc329321af6d531fe4dd author Steven Cole <elenstev@mesatop.com> 1115167110 -0600 committer Greg KH <gregkh@suse.de> 1115189116 -0700 Index: drivers/pci/hotplug/ibmphp.h =================================================================== --- 7e0b5b3d9a0308224fb40e452d93ec842a3377fe/drivers/pci/hotplug/ibmphp.h (mode:100644 sha1:5bc039da647f1e36f6d450a2bb7f8ecb07ab7e96) +++ 2d3db5e9713dd0baeba0be2577731233780f072f/drivers/pci/hotplug/ibmphp.h (mode:100644 sha1:c22e0284d7b143fb9588182e15010788b9142ebe) @@ -196,7 +196,7 @@ /******************************************************************** -* THREE TYPE OF HOT PLUG CONTROLER * +* THREE TYPE OF HOT PLUG CONTROLLER * ********************************************************************/ struct isa_ctlr_access { Index: drivers/pci/hotplug/ibmphp_hpc.c =================================================================== --- 7e0b5b3d9a0308224fb40e452d93ec842a3377fe/drivers/pci/hotplug/ibmphp_hpc.c (mode:100644 sha1:6894b548c8cab0a0a9847cee6f6b03fd5808b2a6) +++ 2d3db5e9713dd0baeba0be2577731233780f072f/drivers/pci/hotplug/ibmphp_hpc.c (mode:100644 sha1:1a3eb8d3d4cbd8b5bbeeb277a14124a992e5c7f2) @@ -64,7 +64,7 @@ #define WPG_I2C_OR 0x2000 // I2C OR operation //---------------------------------------------------------------------------- -// Command set for I2C Master Operation Setup Regisetr +// Command set for I2C Master Operation Setup Register //---------------------------------------------------------------------------- #define WPG_READATADDR_MASK 0x00010000 // read,bytes,I2C shifted,index #define WPG_WRITEATADDR_MASK 0x40010000 // write,bytes,I2C shifted,index @@ -835,7 +835,7 @@ if (ibmphp_shutdown) break; - /* try to get the lock to do some kind of harware access */ + /* try to get the lock to do some kind of hardware access */ down (&semOperations); switch (poll_state) { @@ -906,7 +906,7 @@ poll_state = POLL_LATCH_REGISTER; break; } - /* give up the harware semaphore */ + /* give up the hardware semaphore */ up (&semOperations); /* sleep for a short time just for good measure */ msleep(100); Index: drivers/pci/hotplug/pci_hotplug.h =================================================================== --- 7e0b5b3d9a0308224fb40e452d93ec842a3377fe/drivers/pci/hotplug/pci_hotplug.h (mode:100644 sha1:57ace325168dfd5fc569a2a18b7a2b3cc16f3ed4) +++ 2d3db5e9713dd0baeba0be2577731233780f072f/drivers/pci/hotplug/pci_hotplug.h (mode:100644 sha1:88d44f7fef2908424ca87d67793d1cf78a9c9d4f) @@ -150,7 +150,7 @@ * @name: the name of the slot being registered. This string must * be unique amoung slots registered on this system. * @ops: pointer to the &struct hotplug_slot_ops to be used for this slot - * @info: pointer to the &struct hotplug_slot_info for the inital values for + * @info: pointer to the &struct hotplug_slot_info for the initial values for * this slot. * @release: called during pci_hp_deregister to free memory allocated in a * hotplug_slot structure. Index: drivers/pci/hotplug/pcihp_skeleton.c =================================================================== --- 7e0b5b3d9a0308224fb40e452d93ec842a3377fe/drivers/pci/hotplug/pcihp_skeleton.c (mode:100644 sha1:6605d6bda5291a525fdf6da450b689e8ea3d8ae5) +++ 2d3db5e9713dd0baeba0be2577731233780f072f/drivers/pci/hotplug/pcihp_skeleton.c (mode:100644 sha1:3194d51c6ec9c6109b20a4eb7c5821d7010f2d3c) @@ -297,7 +297,7 @@ hotplug_slot->ops = &skel_hotplug_slot_ops; /* - * Initilize the slot info structure with some known + * Initialize the slot info structure with some known * good values. */ info->power_status = get_power_status(slot); Index: drivers/pci/msi.c =================================================================== --- 7e0b5b3d9a0308224fb40e452d93ec842a3377fe/drivers/pci/msi.c (mode:100644 sha1:22ecd3b058be176a76683a87ae33eb1269ece88a) +++ 2d3db5e9713dd0baeba0be2577731233780f072f/drivers/pci/msi.c (mode:100644 sha1:30206ac43c443c68eb6d89c8fc3146a6f0f307d7) @@ -522,7 +522,7 @@ * msi_capability_init - configure device's MSI capability structure * @dev: pointer to the pci_dev data structure of MSI device function * - * Setup the MSI capability structure of device funtion with a single + * Setup the MSI capability structure of device function with a single * MSI vector, regardless of device function is capable of handling * multiple messages. A return of zero indicates the successful setup * of an entry zero with the new MSI vector or non-zero for otherwise. @@ -599,7 +599,7 @@ * msix_capability_init - configure device's MSI-X capability * @dev: pointer to the pci_dev data structure of MSI-X device function * - * Setup the MSI-X capability structure of device funtion with a + * Setup the MSI-X capability structure of device function with a * single MSI-X vector. A return of zero indicates the successful setup of * requested MSI-X entries with allocated vectors or non-zero for otherwise. **/ @@ -1074,7 +1074,7 @@ * msi_remove_pci_irq_vectors - reclaim MSI(X) vectors to unused state * @dev: pointer to the pci_dev data structure of MSI(X) device function * - * Being called during hotplug remove, from which the device funciton + * Being called during hotplug remove, from which the device function * is hot-removed. All previous assigned MSI/MSI-X vectors, if * allocated for this device function, are reclaimed to unused state, * which may be used later on. Index: drivers/pci/pci-driver.c =================================================================== --- 7e0b5b3d9a0308224fb40e452d93ec842a3377fe/drivers/pci/pci-driver.c (mode:100644 sha1:b42466ccbb309f4961b7a653aa079c3577d7cbb7) +++ 2d3db5e9713dd0baeba0be2577731233780f072f/drivers/pci/pci-driver.c (mode:100644 sha1:fe98553c978f335dae47646cee5df32c8f69b42e) @@ -381,7 +381,7 @@ * * Adds the driver structure to the list of registered drivers. * Returns a negative value on error, otherwise 0. - * If no error occured, the driver remains registered even if + * If no error occurred, the driver remains registered even if * no device was claimed during registration. */ int pci_register_driver(struct pci_driver *drv) ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] PCI: drivers/pci/pci.c: remove pci_dac_set_dma_mask 2005-05-04 7:02 ` [PATCH] PCI: Spelling fixes for drivers/pci Greg KH @ 2005-05-04 7:02 ` Greg KH 0 siblings, 0 replies; 12+ messages in thread From: Greg KH @ 2005-05-04 7:02 UTC (permalink / raw) To: linux-kernel, linux-pci; +Cc: bunk [PATCH] PCI: drivers/pci/pci.c: remove pci_dac_set_dma_mask pci_dac_set_dma_mask is currently completely unused. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- commit 9171078ab5a0bbb516029cfc61378e0350a7b30d tree c0748641f2574f1621bb1f78d14c70c49805e4dd parent b308240b49ff5a1bddc6e10513c2c83f37a0bc78 author Adrian Bunk <bunk@stusta.de> 1114955588 +0200 committer Greg KH <gregkh@suse.de> 1115189117 -0700 Index: arch/arm/mach-ixp4xx/common-pci.c =================================================================== --- 7fda5a4f25632d19ae03589bee0d920efe8026c3/arch/arm/mach-ixp4xx/common-pci.c (mode:100644 sha1:94bcdb933e41f1f0065b12154f9d1a5f3f7c7e36) +++ c0748641f2574f1621bb1f78d14c70c49805e4dd/arch/arm/mach-ixp4xx/common-pci.c (mode:100644 sha1:aa92e3708838ed31fadbead7b073cfc7a3894578) @@ -502,15 +502,6 @@ } int -pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask) -{ - if (mask >= SZ_64M - 1 ) - return 0; - - return -EIO; -} - -int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) { if (mask >= SZ_64M - 1 ) @@ -520,7 +511,6 @@ } EXPORT_SYMBOL(pci_set_dma_mask); -EXPORT_SYMBOL(pci_dac_set_dma_mask); EXPORT_SYMBOL(pci_set_consistent_dma_mask); EXPORT_SYMBOL(ixp4xx_pci_read); EXPORT_SYMBOL(ixp4xx_pci_write); Index: drivers/pci/pci.c =================================================================== --- 7fda5a4f25632d19ae03589bee0d920efe8026c3/drivers/pci/pci.c (mode:100644 sha1:88cbe5b5b3f3f60fbee7915ba3339d2f2f4dc5cf) +++ c0748641f2574f1621bb1f78d14c70c49805e4dd/drivers/pci/pci.c (mode:100644 sha1:f04b9ffe41539a1a2a1acafa6ea5d16b15fbd64b) @@ -749,17 +749,6 @@ } int -pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask) -{ - if (!pci_dac_dma_supported(dev, mask)) - return -EIO; - - dev->dma_mask = mask; - - return 0; -} - -int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) { if (!pci_dma_supported(dev, mask)) @@ -821,7 +810,6 @@ EXPORT_SYMBOL(pci_set_mwi); EXPORT_SYMBOL(pci_clear_mwi); EXPORT_SYMBOL(pci_set_dma_mask); -EXPORT_SYMBOL(pci_dac_set_dma_mask); EXPORT_SYMBOL(pci_set_consistent_dma_mask); EXPORT_SYMBOL(pci_assign_resource); EXPORT_SYMBOL(pci_find_parent_resource); Index: include/linux/pci.h =================================================================== --- 7fda5a4f25632d19ae03589bee0d920efe8026c3/include/linux/pci.h (mode:100644 sha1:cff5ba3ac8ce816c8261dd588be17f488de89507) +++ c0748641f2574f1621bb1f78d14c70c49805e4dd/include/linux/pci.h (mode:100644 sha1:b5238bd188302be2bf941a11594a61814c40120f) @@ -811,7 +811,6 @@ int pci_set_mwi(struct pci_dev *dev); void pci_clear_mwi(struct pci_dev *dev); int pci_set_dma_mask(struct pci_dev *dev, u64 mask); -int pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask); int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); int pci_assign_resource(struct pci_dev *dev, int i); @@ -942,7 +941,6 @@ static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; } static inline void pci_disable_device(struct pci_dev *dev) { } static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; } -static inline int pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; } static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;} static inline int pci_register_driver(struct pci_driver *drv) { return 0;} static inline void pci_unregister_driver(struct pci_driver *drv) { } ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-05-04 7:08 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-05-04 7:01 [GIT PATCH] PCI bugfixes for 2.6.12-rc3 Greg KH 2005-05-04 7:02 ` [PATCH] PCI: 'is_enabled' flag should be set/cleared when the device is actually enabled/disabled Greg KH 2005-05-04 7:02 ` [PATCH] PCI: fix stale PCI pm docs Greg KH 2005-05-04 7:02 ` [PATCH] PCI: update PCI documentation for pci_get_slot() depreciation Greg KH 2005-05-04 7:02 ` [PATCH] PCI: Clean up a lot of sparse "Should it be static?" warnings Greg KH 2005-05-04 7:02 ` [PATCH] PCI Hotplug ibmphp_pci.c: Fix masking out needed information too early Greg KH 2005-05-04 7:02 ` [PATCH] PCI: fix up word-aligned 16-bit PCI config access through sysfs Greg KH 2005-05-04 7:02 ` [PATCH] PCI: Add pci shutdown ability Greg KH 2005-05-04 7:02 ` [PATCH] PCI: Rapid Hance quirk Greg KH 2005-05-04 7:02 ` [PATCH] PCI Hotplug: fix pciehp regression Greg KH 2005-05-04 7:02 ` [PATCH] PCI: Spelling fixes for drivers/pci Greg KH 2005-05-04 7:02 ` [PATCH] PCI: drivers/pci/pci.c: remove pci_dac_set_dma_mask Greg KH
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox