aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJames Bottomley <jejb@titanic.(none)>2005-05-20 16:27:44 -0400
committerJames Bottomley <jejb@titanic.(none)>2005-05-20 16:27:44 -0400
commitad34ea2cc3845ef4dcd7d12fb0fa8484734bd672 (patch)
treead434400f5ecaa33b433c8f830e40792d8d6c05c /drivers/scsi
parent90356ac3194bf91a441a5f9c3067af386ef62462 (diff)
parent88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff)
merge by hand - fix up rejections in Documentation/DocBook/Makefile
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/Kconfig12
-rw-r--r--drivers/scsi/NCR53C9x.c5
-rw-r--r--drivers/scsi/aacraid/linit.c2
-rw-r--r--drivers/scsi/esp.c11
-rw-r--r--drivers/scsi/pas16.c6
-rw-r--r--drivers/scsi/pluto.c2
-rw-r--r--drivers/scsi/scsi.c2
-rw-r--r--drivers/scsi/scsi_error.c2
-rw-r--r--drivers/scsi/scsi_scan.c2
-rw-r--r--drivers/scsi/scsi_transport_spi.c49
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c5
11 files changed, 63 insertions, 35 deletions
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index ba88be399a59..88e34095ca4e 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -278,7 +278,7 @@ config SCSI_3W_9XXX
278 278
279config SCSI_7000FASST 279config SCSI_7000FASST
280 tristate "7000FASST SCSI support" 280 tristate "7000FASST SCSI support"
281 depends on ISA && SCSI 281 depends on ISA && SCSI && ISA_DMA_API
282 help 282 help
283 This driver supports the Western Digital 7000 SCSI host adapter 283 This driver supports the Western Digital 7000 SCSI host adapter
284 family. Some information is in the source: 284 family. Some information is in the source:
@@ -313,7 +313,7 @@ config SCSI_AHA152X
313 313
314config SCSI_AHA1542 314config SCSI_AHA1542
315 tristate "Adaptec AHA1542 support" 315 tristate "Adaptec AHA1542 support"
316 depends on ISA && SCSI 316 depends on ISA && SCSI && ISA_DMA_API
317 ---help--- 317 ---help---
318 This is support for a SCSI host adapter. It is explained in section 318 This is support for a SCSI host adapter. It is explained in section
319 3.4 of the SCSI-HOWTO, available from 319 3.4 of the SCSI-HOWTO, available from
@@ -533,7 +533,7 @@ config SCSI_SATA_VITESSE
533 533
534config SCSI_BUSLOGIC 534config SCSI_BUSLOGIC
535 tristate "BusLogic SCSI support" 535 tristate "BusLogic SCSI support"
536 depends on (PCI || ISA || MCA) && SCSI && (BROKEN || !SPARC64) 536 depends on (PCI || ISA || MCA) && SCSI && ISA_DMA_API
537 ---help--- 537 ---help---
538 This is support for BusLogic MultiMaster and FlashPoint SCSI Host 538 This is support for BusLogic MultiMaster and FlashPoint SCSI Host
539 Adapters. Consult the SCSI-HOWTO, available from 539 Adapters. Consult the SCSI-HOWTO, available from
@@ -589,7 +589,7 @@ config SCSI_DTC3280
589 589
590config SCSI_EATA 590config SCSI_EATA
591 tristate "EATA ISA/EISA/PCI (DPT and generic EATA/DMA-compliant boards) support" 591 tristate "EATA ISA/EISA/PCI (DPT and generic EATA/DMA-compliant boards) support"
592 depends on (ISA || EISA || PCI) && SCSI && (BROKEN || !SPARC64) 592 depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API
593 ---help--- 593 ---help---
594 This driver supports all EATA/DMA-compliant SCSI host adapters. DPT 594 This driver supports all EATA/DMA-compliant SCSI host adapters. DPT
595 ISA and all EISA I/O addresses are probed looking for the "EATA" 595 ISA and all EISA I/O addresses are probed looking for the "EATA"
@@ -683,7 +683,7 @@ config SCSI_FD_MCS
683 683
684config SCSI_GDTH 684config SCSI_GDTH
685 tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support" 685 tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support"
686 depends on (ISA || EISA || PCI) && SCSI && (BROKEN || !SPARC64) 686 depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API
687 ---help--- 687 ---help---
688 Formerly called GDT SCSI Disk Array Controller Support. 688 Formerly called GDT SCSI Disk Array Controller Support.
689 689
@@ -1412,7 +1412,7 @@ config SCSI_T128
1412 1412
1413config SCSI_U14_34F 1413config SCSI_U14_34F
1414 tristate "UltraStor 14F/34F support" 1414 tristate "UltraStor 14F/34F support"
1415 depends on ISA && SCSI 1415 depends on ISA && SCSI && ISA_DMA_API
1416 ---help--- 1416 ---help---
1417 This is support for the UltraStor 14F and 34F SCSI-2 host adapters. 1417 This is support for the UltraStor 14F and 34F SCSI-2 host adapters.
1418 The source at <file:drivers/scsi/u14-34f.c> contains some 1418 The source at <file:drivers/scsi/u14-34f.c> contains some
diff --git a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c
index 74293f62a622..064781a2cb1a 100644
--- a/drivers/scsi/NCR53C9x.c
+++ b/drivers/scsi/NCR53C9x.c
@@ -1824,7 +1824,10 @@ static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs)
1824 /* loop */ 1824 /* loop */
1825 while (hmuch) { 1825 while (hmuch) {
1826 int j, fifo_stuck = 0, newphase; 1826 int j, fifo_stuck = 0, newphase;
1827 unsigned long flags, timeout; 1827 unsigned long timeout;
1828#if 0
1829 unsigned long flags;
1830#endif
1828#if 0 1831#if 0
1829 if ( i % 10 ) 1832 if ( i % 10 )
1830 ESPDATA(("\r")); 1833 ESPDATA(("\r"));
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 7e9e6b3186ae..5fd8f3ee9804 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -450,7 +450,7 @@ static int aac_cfg_open(struct inode *inode, struct file *file)
450 } 450 }
451 } 451 }
452 452
453 return 0; 453 return err;
454} 454}
455 455
456/** 456/**
diff --git a/drivers/scsi/esp.c b/drivers/scsi/esp.c
index d8ab73b68031..f6900538be90 100644
--- a/drivers/scsi/esp.c
+++ b/drivers/scsi/esp.c
@@ -49,6 +49,8 @@
49#include <scsi/scsi_host.h> 49#include <scsi/scsi_host.h>
50#include <scsi/scsi_tcq.h> 50#include <scsi/scsi_tcq.h>
51 51
52#define DRV_VERSION "1.101"
53
52#define DEBUG_ESP 54#define DEBUG_ESP
53/* #define DEBUG_ESP_HME */ 55/* #define DEBUG_ESP_HME */
54/* #define DEBUG_ESP_DATA */ 56/* #define DEBUG_ESP_DATA */
@@ -1145,7 +1147,7 @@ static int __init esp_detect(struct scsi_host_template *tpnt)
1145 static struct sbus_dev esp_dev; 1147 static struct sbus_dev esp_dev;
1146 int esps_in_use = 0; 1148 int esps_in_use = 0;
1147 1149
1148 espchain = 0; 1150 espchain = NULL;
1149 1151
1150 if (sun4_esp_physaddr) { 1152 if (sun4_esp_physaddr) {
1151 memset (&esp_dev, 0, sizeof(esp_dev)); 1153 memset (&esp_dev, 0, sizeof(esp_dev));
@@ -2511,7 +2513,7 @@ static inline void esp_reconnect(struct esp *esp, struct scsi_cmnd *sp)
2511 ESPLOG(("esp%d: Weird, being reselected but disconnected " 2513 ESPLOG(("esp%d: Weird, being reselected but disconnected "
2512 "command queue is empty.\n", esp->esp_id)); 2514 "command queue is empty.\n", esp->esp_id));
2513 esp->snip = 0; 2515 esp->snip = 0;
2514 esp->current_SC = 0; 2516 esp->current_SC = NULL;
2515 sp->SCp.phase = not_issued; 2517 sp->SCp.phase = not_issued;
2516 append_SC(&esp->issue_SC, sp); 2518 append_SC(&esp->issue_SC, sp);
2517} 2519}
@@ -4146,7 +4148,7 @@ static int esp_work_bus(struct esp *esp)
4146} 4148}
4147 4149
4148static espfunc_t isvc_vector[] = { 4150static espfunc_t isvc_vector[] = {
4149 0, 4151 NULL,
4150 esp_do_phase_determine, 4152 esp_do_phase_determine,
4151 esp_do_resetbus, 4153 esp_do_resetbus,
4152 esp_finish_reset, 4154 esp_finish_reset,
@@ -4398,5 +4400,8 @@ static struct scsi_host_template driver_template = {
4398 4400
4399#include "scsi_module.c" 4401#include "scsi_module.c"
4400 4402
4403MODULE_DESCRIPTION("EnhancedScsiProcessor Sun SCSI driver");
4404MODULE_AUTHOR("David S. Miller (davem@redhat.com)");
4401MODULE_LICENSE("GPL"); 4405MODULE_LICENSE("GPL");
4406MODULE_VERSION(DRV_VERSION);
4402 4407
diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c
index e70dedb0d0a5..7976947c0322 100644
--- a/drivers/scsi/pas16.c
+++ b/drivers/scsi/pas16.c
@@ -137,7 +137,7 @@ static unsigned short pas16_addr = 0;
137static int pas16_irq = 0; 137static int pas16_irq = 0;
138 138
139 139
140int scsi_irq_translate[] = 140static const int scsi_irq_translate[] =
141 { 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 0, 10, 11 }; 141 { 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 0, 10, 11 };
142 142
143/* The default_irqs array contains values used to set the irq into the 143/* The default_irqs array contains values used to set the irq into the
@@ -145,7 +145,7 @@ int scsi_irq_translate[] =
145 * irq jumpers on the board). The first value in the array will be 145 * irq jumpers on the board). The first value in the array will be
146 * assigned to logical board 0, the next to board 1, etc. 146 * assigned to logical board 0, the next to board 1, etc.
147 */ 147 */
148int default_irqs[] __initdata = 148static int default_irqs[] __initdata =
149 { PAS16_DEFAULT_BOARD_1_IRQ, 149 { PAS16_DEFAULT_BOARD_1_IRQ,
150 PAS16_DEFAULT_BOARD_2_IRQ, 150 PAS16_DEFAULT_BOARD_2_IRQ,
151 PAS16_DEFAULT_BOARD_3_IRQ, 151 PAS16_DEFAULT_BOARD_3_IRQ,
@@ -177,7 +177,7 @@ static struct base {
177 177
178#define NO_BASES (sizeof (bases) / sizeof (struct base)) 178#define NO_BASES (sizeof (bases) / sizeof (struct base))
179 179
180unsigned short pas16_offset[ 8 ] = 180static const unsigned short pas16_offset[ 8 ] =
181 { 181 {
182 0x1c00, /* OUTPUT_DATA_REG */ 182 0x1c00, /* OUTPUT_DATA_REG */
183 0x1c01, /* INITIATOR_COMMAND_REG */ 183 0x1c01, /* INITIATOR_COMMAND_REG */
diff --git a/drivers/scsi/pluto.c b/drivers/scsi/pluto.c
index 7bb0a2e56743..c01b7191fcf5 100644
--- a/drivers/scsi/pluto.c
+++ b/drivers/scsi/pluto.c
@@ -45,7 +45,7 @@ static struct ctrl_inquiry {
45 Scsi_Cmnd cmd; 45 Scsi_Cmnd cmd;
46 char inquiry[256]; 46 char inquiry[256];
47 fc_channel *fc; 47 fc_channel *fc;
48} *fcs __initdata = { 0 }; 48} *fcs __initdata;
49static int fcscount __initdata = 0; 49static int fcscount __initdata = 0;
50static atomic_t fcss __initdata = ATOMIC_INIT(0); 50static atomic_t fcss __initdata = ATOMIC_INIT(0);
51DECLARE_MUTEX_LOCKED(fc_sem); 51DECLARE_MUTEX_LOCKED(fc_sem);
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 0d730f646bce..5578ae9a9e45 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -542,7 +542,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
542 * that the device is no longer present */ 542 * that the device is no longer present */
543 cmd->result = DID_NO_CONNECT << 16; 543 cmd->result = DID_NO_CONNECT << 16;
544 atomic_inc(&cmd->device->iorequest_cnt); 544 atomic_inc(&cmd->device->iorequest_cnt);
545 scsi_done(cmd); 545 __scsi_done(cmd);
546 /* return 0 (because the command has been processed) */ 546 /* return 0 (because the command has been processed) */
547 goto out; 547 goto out;
548 } 548 }
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 103558574662..cb789c35262c 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -582,7 +582,7 @@ static int scsi_request_sense(struct scsi_cmnd *scmd)
582 582
583 memcpy(scmd->cmnd, generic_sense, sizeof(generic_sense)); 583 memcpy(scmd->cmnd, generic_sense, sizeof(generic_sense));
584 584
585 scsi_result = kmalloc(252, GFP_ATOMIC | (scmd->device->host->hostt->unchecked_isa_dma) ? __GFP_DMA : 0); 585 scsi_result = kmalloc(252, GFP_ATOMIC | ((scmd->device->host->hostt->unchecked_isa_dma) ? __GFP_DMA : 0));
586 586
587 587
588 if (unlikely(!scsi_result)) { 588 if (unlikely(!scsi_result)) {
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 287d197a7c17..cca772624ae7 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -801,7 +801,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,
801 if (!sreq) 801 if (!sreq)
802 goto out_free_sdev; 802 goto out_free_sdev;
803 result = kmalloc(256, GFP_ATOMIC | 803 result = kmalloc(256, GFP_ATOMIC |
804 (shost->unchecked_isa_dma) ? __GFP_DMA : 0); 804 ((shost->unchecked_isa_dma) ? __GFP_DMA : 0));
805 if (!result) 805 if (!result)
806 goto out_free_sreq; 806 goto out_free_sreq;
807 807
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
index 303d7656f710..28966d05435c 100644
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -22,6 +22,7 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/workqueue.h> 24#include <linux/workqueue.h>
25#include <linux/blkdev.h>
25#include <asm/semaphore.h> 26#include <asm/semaphore.h>
26#include <scsi/scsi.h> 27#include <scsi/scsi.h>
27#include "scsi_priv.h" 28#include "scsi_priv.h"
@@ -41,6 +42,11 @@
41 42
42#define SPI_MAX_ECHO_BUFFER_SIZE 4096 43#define SPI_MAX_ECHO_BUFFER_SIZE 4096
43 44
45#define DV_LOOPS 3
46#define DV_TIMEOUT (10*HZ)
47#define DV_RETRIES 3 /* should only need at most
48 * two cc/ua clears */
49
44/* Private data accessors (keep these out of the header file) */ 50/* Private data accessors (keep these out of the header file) */
45#define spi_dv_pending(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_pending) 51#define spi_dv_pending(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_pending)
46#define spi_dv_sem(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_sem) 52#define spi_dv_sem(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_sem)
@@ -100,6 +106,29 @@ static int sprint_frac(char *dest, int value, int denom)
100 return result; 106 return result;
101} 107}
102 108
109/* Modification of scsi_wait_req that will clear UNIT ATTENTION conditions
110 * resulting from (likely) bus and device resets */
111static void spi_wait_req(struct scsi_request *sreq, const void *cmd,
112 void *buffer, unsigned bufflen)
113{
114 int i;
115
116 for(i = 0; i < DV_RETRIES; i++) {
117 sreq->sr_request->flags |= REQ_FAILFAST;
118
119 scsi_wait_req(sreq, cmd, buffer, bufflen,
120 DV_TIMEOUT, /* retries */ 1);
121 if (sreq->sr_result & DRIVER_SENSE) {
122 struct scsi_sense_hdr sshdr;
123
124 if (scsi_request_normalize_sense(sreq, &sshdr)
125 && sshdr.sense_key == UNIT_ATTENTION)
126 continue;
127 }
128 break;
129 }
130}
131
103static struct { 132static struct {
104 enum spi_signal_type value; 133 enum spi_signal_type value;
105 char *name; 134 char *name;
@@ -378,11 +407,6 @@ static CLASS_DEVICE_ATTR(signalling, S_IRUGO | S_IWUSR,
378 if(i->f->set_##x) \ 407 if(i->f->set_##x) \
379 i->f->set_##x(sdev->sdev_target, y) 408 i->f->set_##x(sdev->sdev_target, y)
380 409
381#define DV_LOOPS 3
382#define DV_TIMEOUT (10*HZ)
383#define DV_RETRIES 3 /* should only need at most
384 * two cc/ua clears */
385
386enum spi_compare_returns { 410enum spi_compare_returns {
387 SPI_COMPARE_SUCCESS, 411 SPI_COMPARE_SUCCESS,
388 SPI_COMPARE_FAILURE, 412 SPI_COMPARE_FAILURE,
@@ -446,8 +470,7 @@ spi_dv_device_echo_buffer(struct scsi_request *sreq, u8 *buffer,
446 for (r = 0; r < retries; r++) { 470 for (r = 0; r < retries; r++) {
447 sreq->sr_cmd_len = 0; /* wait_req to fill in */ 471 sreq->sr_cmd_len = 0; /* wait_req to fill in */
448 sreq->sr_data_direction = DMA_TO_DEVICE; 472 sreq->sr_data_direction = DMA_TO_DEVICE;
449 scsi_wait_req(sreq, spi_write_buffer, buffer, len, 473 spi_wait_req(sreq, spi_write_buffer, buffer, len);
450 DV_TIMEOUT, DV_RETRIES);
451 if(sreq->sr_result || !scsi_device_online(sdev)) { 474 if(sreq->sr_result || !scsi_device_online(sdev)) {
452 struct scsi_sense_hdr sshdr; 475 struct scsi_sense_hdr sshdr;
453 476
@@ -471,8 +494,7 @@ spi_dv_device_echo_buffer(struct scsi_request *sreq, u8 *buffer,
471 memset(ptr, 0, len); 494 memset(ptr, 0, len);
472 sreq->sr_cmd_len = 0; /* wait_req to fill in */ 495 sreq->sr_cmd_len = 0; /* wait_req to fill in */
473 sreq->sr_data_direction = DMA_FROM_DEVICE; 496 sreq->sr_data_direction = DMA_FROM_DEVICE;
474 scsi_wait_req(sreq, spi_read_buffer, ptr, len, 497 spi_wait_req(sreq, spi_read_buffer, ptr, len);
475 DV_TIMEOUT, DV_RETRIES);
476 scsi_device_set_state(sdev, SDEV_QUIESCE); 498 scsi_device_set_state(sdev, SDEV_QUIESCE);
477 499
478 if (memcmp(buffer, ptr, len) != 0) 500 if (memcmp(buffer, ptr, len) != 0)
@@ -500,8 +522,7 @@ spi_dv_device_compare_inquiry(struct scsi_request *sreq, u8 *buffer,
500 522
501 memset(ptr, 0, len); 523 memset(ptr, 0, len);
502 524
503 scsi_wait_req(sreq, spi_inquiry, ptr, len, 525 spi_wait_req(sreq, spi_inquiry, ptr, len);
504 DV_TIMEOUT, DV_RETRIES);
505 526
506 if(sreq->sr_result || !scsi_device_online(sdev)) { 527 if(sreq->sr_result || !scsi_device_online(sdev)) {
507 scsi_device_set_state(sdev, SDEV_QUIESCE); 528 scsi_device_set_state(sdev, SDEV_QUIESCE);
@@ -593,8 +614,7 @@ spi_dv_device_get_echo_buffer(struct scsi_request *sreq, u8 *buffer)
593 * (reservation conflict, device not ready, etc) just 614 * (reservation conflict, device not ready, etc) just
594 * skip the write tests */ 615 * skip the write tests */
595 for (l = 0; ; l++) { 616 for (l = 0; ; l++) {
596 scsi_wait_req(sreq, spi_test_unit_ready, NULL, 0, 617 spi_wait_req(sreq, spi_test_unit_ready, NULL, 0);
597 DV_TIMEOUT, DV_RETRIES);
598 618
599 if(sreq->sr_result) { 619 if(sreq->sr_result) {
600 if(l >= 3) 620 if(l >= 3)
@@ -608,8 +628,7 @@ spi_dv_device_get_echo_buffer(struct scsi_request *sreq, u8 *buffer)
608 sreq->sr_cmd_len = 0; 628 sreq->sr_cmd_len = 0;
609 sreq->sr_data_direction = DMA_FROM_DEVICE; 629 sreq->sr_data_direction = DMA_FROM_DEVICE;
610 630
611 scsi_wait_req(sreq, spi_read_buffer_descriptor, buffer, 4, 631 spi_wait_req(sreq, spi_read_buffer_descriptor, buffer, 4);
612 DV_TIMEOUT, DV_RETRIES);
613 632
614 if (sreq->sr_result) 633 if (sreq->sr_result)
615 /* Device has no echo buffer */ 634 /* Device has no echo buffer */
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index 5ff83d214f12..5b07c6ec3ecc 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -2038,8 +2038,9 @@ static void sym2_set_period(struct scsi_target *starget, int period)
2038 struct sym_hcb *np = sym_get_hcb(shost); 2038 struct sym_hcb *np = sym_get_hcb(shost);
2039 struct sym_tcb *tp = &np->target[starget->id]; 2039 struct sym_tcb *tp = &np->target[starget->id];
2040 2040
2041 /* have to have DT for these transfers */ 2041 /* have to have DT for these transfers, but DT will also
2042 if (period <= np->minsync) 2042 * set width, so check that this is allowed */
2043 if (period <= np->minsync && spi_width(starget))
2043 tp->tgoal.dt = 1; 2044 tp->tgoal.dt = 1;
2044 2045
2045 tp->tgoal.period = period; 2046 tp->tgoal.period = period;